diff options
Diffstat (limited to 'server/controllers/api/accounts.ts')
-rw-r--r-- | server/controllers/api/accounts.ts | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/server/controllers/api/accounts.ts b/server/controllers/api/accounts.ts index 05740318e..f354ccf24 100644 --- a/server/controllers/api/accounts.ts +++ b/server/controllers/api/accounts.ts | |||
@@ -16,21 +16,17 @@ import { | |||
16 | accountNameWithHostGetValidator, | 16 | accountNameWithHostGetValidator, |
17 | accountsSortValidator, | 17 | accountsSortValidator, |
18 | ensureAuthUserOwnsAccountValidator, | 18 | ensureAuthUserOwnsAccountValidator, |
19 | videosSortValidator, | 19 | videoChannelsSortValidator, |
20 | videoChannelsSortValidator | 20 | videosSortValidator |
21 | } from '../../middlewares/validators' | 21 | } from '../../middlewares/validators' |
22 | import { AccountModel } from '../../models/account/account' | 22 | import { AccountModel } from '../../models/account/account' |
23 | import { AccountVideoRateModel } from '../../models/account/account-video-rate' | 23 | import { AccountVideoRateModel } from '../../models/account/account-video-rate' |
24 | import { VideoModel } from '../../models/video/video' | 24 | import { VideoModel } from '../../models/video/video' |
25 | import { buildNSFWFilter, isUserAbleToSearchRemoteURI, getCountVideos } from '../../helpers/express-utils' | 25 | import { buildNSFWFilter, getCountVideos, isUserAbleToSearchRemoteURI } from '../../helpers/express-utils' |
26 | import { VideoChannelModel } from '../../models/video/video-channel' | 26 | import { VideoChannelModel } from '../../models/video/video-channel' |
27 | import { JobQueue } from '../../lib/job-queue' | 27 | import { JobQueue } from '../../lib/job-queue' |
28 | import { logger } from '../../helpers/logger' | ||
29 | import { VideoPlaylistModel } from '../../models/video/video-playlist' | 28 | import { VideoPlaylistModel } from '../../models/video/video-playlist' |
30 | import { | 29 | import { commonVideoPlaylistFiltersValidator, videoPlaylistsSearchValidator } from '../../middlewares/validators/videos/video-playlists' |
31 | commonVideoPlaylistFiltersValidator, | ||
32 | videoPlaylistsSearchValidator | ||
33 | } from '../../middlewares/validators/videos/video-playlists' | ||
34 | 30 | ||
35 | const accountsRouter = express.Router() | 31 | const accountsRouter = express.Router() |
36 | 32 | ||
@@ -104,7 +100,6 @@ function getAccount (req: express.Request, res: express.Response) { | |||
104 | 100 | ||
105 | if (account.isOutdated()) { | 101 | if (account.isOutdated()) { |
106 | JobQueue.Instance.createJob({ type: 'activitypub-refresher', payload: { type: 'actor', url: account.Actor.url } }) | 102 | JobQueue.Instance.createJob({ type: 'activitypub-refresher', payload: { type: 'actor', url: account.Actor.url } }) |
107 | .catch(err => logger.error('Cannot create AP refresher job for actor %s.', account.Actor.url, { err })) | ||
108 | } | 103 | } |
109 | 104 | ||
110 | return res.json(account.toFormattedJSON()) | 105 | return res.json(account.toFormattedJSON()) |