diff options
author | Chocobozzz <me@florianbigard.com> | 2020-08-06 14:58:01 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-08-07 08:28:14 +0200 |
commit | bd45d503e5d007e730f4e81dccd7e7864c9a85cc (patch) | |
tree | b78df768b8253ba401232c17da940cea016c9960 /server/controllers | |
parent | 583eb04b541175035d6d452ca626a96ebf2b7437 (diff) | |
download | PeerTube-bd45d503e5d007e730f4e81dccd7e7864c9a85cc.tar.gz PeerTube-bd45d503e5d007e730f4e81dccd7e7864c9a85cc.tar.zst PeerTube-bd45d503e5d007e730f4e81dccd7e7864c9a85cc.zip |
Reorganize shared models
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/api/abuse.ts | 7 | ||||
-rw-r--r-- | server/controllers/client.ts | 10 | ||||
-rw-r--r-- | server/controllers/plugins.ts | 2 |
3 files changed, 10 insertions, 9 deletions
diff --git a/server/controllers/api/abuse.ts b/server/controllers/api/abuse.ts index 03e6be8c8..b97b99f16 100644 --- a/server/controllers/api/abuse.ts +++ b/server/controllers/api/abuse.ts | |||
@@ -1,9 +1,12 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import { logger } from '@server/helpers/logger' | ||
2 | import { createAccountAbuse, createVideoAbuse, createVideoCommentAbuse } from '@server/lib/moderation' | 3 | import { createAccountAbuse, createVideoAbuse, createVideoCommentAbuse } from '@server/lib/moderation' |
4 | import { Notifier } from '@server/lib/notifier' | ||
3 | import { AbuseModel } from '@server/models/abuse/abuse' | 5 | import { AbuseModel } from '@server/models/abuse/abuse' |
4 | import { AbuseMessageModel } from '@server/models/abuse/abuse-message' | 6 | import { AbuseMessageModel } from '@server/models/abuse/abuse-message' |
5 | import { getServerActor } from '@server/models/application/application' | 7 | import { getServerActor } from '@server/models/application/application' |
6 | import { AbuseCreate, abusePredefinedReasonsMap, AbuseState, UserRight } from '../../../shared' | 8 | import { abusePredefinedReasonsMap } from '@shared/core-utils/abuse' |
9 | import { AbuseCreate, AbuseState, UserRight } from '../../../shared' | ||
7 | import { getFormattedObjects } from '../../helpers/utils' | 10 | import { getFormattedObjects } from '../../helpers/utils' |
8 | import { sequelizeTypescript } from '../../initializers/database' | 11 | import { sequelizeTypescript } from '../../initializers/database' |
9 | import { | 12 | import { |
@@ -25,8 +28,6 @@ import { | |||
25 | setDefaultSort | 28 | setDefaultSort |
26 | } from '../../middlewares' | 29 | } from '../../middlewares' |
27 | import { AccountModel } from '../../models/account/account' | 30 | import { AccountModel } from '../../models/account/account' |
28 | import { Notifier } from '@server/lib/notifier' | ||
29 | import { logger } from '@server/helpers/logger' | ||
30 | 31 | ||
31 | const abuseRouter = express.Router() | 32 | const abuseRouter = express.Router() |
32 | 33 | ||
diff --git a/server/controllers/client.ts b/server/controllers/client.ts index 8c7f881a9..7c80820f4 100644 --- a/server/controllers/client.ts +++ b/server/controllers/client.ts | |||
@@ -1,13 +1,13 @@ | |||
1 | import { constants, promises as fs } from 'fs' | ||
2 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import { constants, promises as fs } from 'fs' | ||
3 | import { join } from 'path' | 3 | import { join } from 'path' |
4 | import { CONFIG } from '@server/initializers/config' | ||
5 | import { buildFileLocale, getCompleteLocale, is18nLocale, LOCALE_FILES } from '@shared/core-utils/i18n' | ||
4 | import { root } from '../helpers/core-utils' | 6 | import { root } from '../helpers/core-utils' |
7 | import { logger } from '../helpers/logger' | ||
5 | import { ACCEPT_HEADERS, STATIC_MAX_AGE } from '../initializers/constants' | 8 | import { ACCEPT_HEADERS, STATIC_MAX_AGE } from '../initializers/constants' |
6 | import { asyncMiddleware, embedCSP } from '../middlewares' | ||
7 | import { buildFileLocale, getCompleteLocale, is18nLocale, LOCALE_FILES } from '../../shared/models/i18n/i18n' | ||
8 | import { ClientHtml } from '../lib/client-html' | 9 | import { ClientHtml } from '../lib/client-html' |
9 | import { logger } from '../helpers/logger' | 10 | import { asyncMiddleware, embedCSP } from '../middlewares' |
10 | import { CONFIG } from '@server/initializers/config' | ||
11 | 11 | ||
12 | const clientsRouter = express.Router() | 12 | const clientsRouter = express.Router() |
13 | 13 | ||
diff --git a/server/controllers/plugins.ts b/server/controllers/plugins.ts index f88a1632d..7b947bb6e 100644 --- a/server/controllers/plugins.ts +++ b/server/controllers/plugins.ts | |||
@@ -6,7 +6,7 @@ import { getPluginValidator, pluginStaticDirectoryValidator, getExternalAuthVali | |||
6 | import { serveThemeCSSValidator } from '../middlewares/validators/themes' | 6 | import { serveThemeCSSValidator } from '../middlewares/validators/themes' |
7 | import { PluginType } from '../../shared/models/plugins/plugin.type' | 7 | import { PluginType } from '../../shared/models/plugins/plugin.type' |
8 | import { isTestInstance } from '../helpers/core-utils' | 8 | import { isTestInstance } from '../helpers/core-utils' |
9 | import { getCompleteLocale, is18nLocale } from '../../shared/models/i18n' | 9 | import { getCompleteLocale, is18nLocale } from '../../shared/core-utils/i18n' |
10 | import { logger } from '@server/helpers/logger' | 10 | import { logger } from '@server/helpers/logger' |
11 | 11 | ||
12 | const sendFileOptions = { | 12 | const sendFileOptions = { |