aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api')
-rw-r--r--server/controllers/api/server/follows.ts2
-rw-r--r--server/controllers/api/videos/channel.ts11
2 files changed, 6 insertions, 7 deletions
diff --git a/server/controllers/api/server/follows.ts b/server/controllers/api/server/follows.ts
index 913998e3a..497edb8eb 100644
--- a/server/controllers/api/server/follows.ts
+++ b/server/controllers/api/server/follows.ts
@@ -157,7 +157,7 @@ async function removeFollow (req: express.Request, res: express.Response, next:
157 // This could be long so don't wait this task 157 // This could be long so don't wait this task
158 const following = follow.AccountFollowing 158 const following = follow.AccountFollowing
159 following.destroy() 159 following.destroy()
160 .catch(err => logger.error('Cannot destroy account that we do not follow anymore %s.', following.url, err)) 160 .catch(err => logger.error('Cannot destroy account that we do not follow anymore %s.', following.Actor.url, err))
161 161
162 return res.status(204).end() 162 return res.status(204).end()
163} 163}
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) {