diff options
Diffstat (limited to 'server/controllers/api/videos/channel.ts')
-rw-r--r-- | server/controllers/api/videos/channel.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/server/controllers/api/videos/channel.ts b/server/controllers/api/videos/channel.ts index ce2656e71..d99f47c32 100644 --- a/server/controllers/api/videos/channel.ts +++ b/server/controllers/api/videos/channel.ts | |||
@@ -3,6 +3,7 @@ import { VideoChannelCreate, VideoChannelUpdate } from '../../../../shared' | |||
3 | import { getFormattedObjects, logger, resetSequelizeInstance, retryTransactionWrapper } from '../../../helpers' | 3 | import { getFormattedObjects, logger, resetSequelizeInstance, retryTransactionWrapper } from '../../../helpers' |
4 | import { database as db } from '../../../initializers' | 4 | import { database as db } from '../../../initializers' |
5 | import { createVideoChannel } from '../../../lib' | 5 | import { createVideoChannel } from '../../../lib' |
6 | import { sendUpdateVideoChannel } from '../../../lib/activitypub/send/send-update' | ||
6 | import { | 7 | import { |
7 | asyncMiddleware, | 8 | asyncMiddleware, |
8 | authenticate, | 9 | authenticate, |
@@ -10,14 +11,13 @@ import { | |||
10 | paginationValidator, | 11 | paginationValidator, |
11 | setPagination, | 12 | setPagination, |
12 | setVideoChannelsSort, | 13 | setVideoChannelsSort, |
13 | videoChannelsGetValidator, | ||
14 | videoChannelsAddValidator, | 14 | videoChannelsAddValidator, |
15 | videoChannelsGetValidator, | ||
15 | videoChannelsRemoveValidator, | 16 | videoChannelsRemoveValidator, |
16 | videoChannelsSortValidator, | 17 | videoChannelsSortValidator, |
17 | videoChannelsUpdateValidator | 18 | videoChannelsUpdateValidator |
18 | } from '../../../middlewares' | 19 | } from '../../../middlewares' |
19 | import { AccountInstance, VideoChannelInstance } from '../../../models' | 20 | import { AccountInstance, VideoChannelInstance } from '../../../models' |
20 | import { sendUpdateVideoChannel } from '../../../lib/activitypub/send/send-update' | ||
21 | 21 | ||
22 | const videoChannelRouter = express.Router() | 22 | const videoChannelRouter = express.Router() |
23 | 23 | ||
@@ -30,7 +30,7 @@ videoChannelRouter.get('/channels', | |||
30 | ) | 30 | ) |
31 | 31 | ||
32 | videoChannelRouter.get('/accounts/:accountId/channels', | 32 | videoChannelRouter.get('/accounts/:accountId/channels', |
33 | listVideoAccountChannelsValidator, | 33 | asyncMiddleware(listVideoAccountChannelsValidator), |
34 | asyncMiddleware(listVideoAccountChannels) | 34 | asyncMiddleware(listVideoAccountChannels) |
35 | ) | 35 | ) |
36 | 36 | ||
@@ -42,18 +42,18 @@ videoChannelRouter.post('/channels', | |||
42 | 42 | ||
43 | videoChannelRouter.put('/channels/:id', | 43 | videoChannelRouter.put('/channels/:id', |
44 | authenticate, | 44 | authenticate, |
45 | videoChannelsUpdateValidator, | 45 | asyncMiddleware(videoChannelsUpdateValidator), |
46 | updateVideoChannelRetryWrapper | 46 | updateVideoChannelRetryWrapper |
47 | ) | 47 | ) |
48 | 48 | ||
49 | videoChannelRouter.delete('/channels/:id', | 49 | videoChannelRouter.delete('/channels/:id', |
50 | authenticate, | 50 | authenticate, |
51 | videoChannelsRemoveValidator, | 51 | asyncMiddleware(videoChannelsRemoveValidator), |
52 | asyncMiddleware(removeVideoChannelRetryWrapper) | 52 | asyncMiddleware(removeVideoChannelRetryWrapper) |
53 | ) | 53 | ) |
54 | 54 | ||
55 | videoChannelRouter.get('/channels/:id', | 55 | videoChannelRouter.get('/channels/:id', |
56 | videoChannelsGetValidator, | 56 | asyncMiddleware(videoChannelsGetValidator), |
57 | asyncMiddleware(getVideoChannel) | 57 | asyncMiddleware(getVideoChannel) |
58 | ) | 58 | ) |
59 | 59 | ||