aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos/channel.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/videos/channel.ts')
-rw-r--r--server/controllers/api/videos/channel.ts11
1 files changed, 5 insertions, 6 deletions
diff --git a/server/controllers/api/videos/channel.ts b/server/controllers/api/videos/channel.ts
index 683b0448d..315469115 100644
--- a/server/controllers/api/videos/channel.ts
+++ b/server/controllers/api/videos/channel.ts
@@ -92,16 +92,15 @@ async function addVideoChannelRetryWrapper (req: express.Request, res: express.R
92 return res.type('json').status(204).end() 92 return res.type('json').status(204).end()
93} 93}
94 94
95async function addVideoChannel (req: express.Request, res: express.Response) { 95function addVideoChannel (req: express.Request, res: express.Response) {
96 const videoChannelInfo: VideoChannelCreate = req.body 96 const videoChannelInfo: VideoChannelCreate = req.body
97 const account: AccountModel = res.locals.oauth.token.User.Account 97 const account: AccountModel = res.locals.oauth.token.User.Account
98 let videoChannelCreated: VideoChannelModel
99 98
100 await sequelizeTypescript.transaction(async t => { 99 return sequelizeTypescript.transaction(async t => {
101 videoChannelCreated = await createVideoChannel(videoChannelInfo, account, t) 100 const videoChannelCreated = await createVideoChannel(videoChannelInfo, account, t)
102 })
103 101
104 logger.info('Video channel with uuid %s created.', videoChannelCreated.uuid) 102 logger.info('Video channel with uuid %s created.', videoChannelCreated.uuid)
103 })
105} 104}
106 105
107async function updateVideoChannelRetryWrapper (req: express.Request, res: express.Response, next: express.NextFunction) { 106async function updateVideoChannelRetryWrapper (req: express.Request, res: express.Response, next: express.NextFunction) {