diff options
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/api/users/index.ts | 3 | ||||
-rw-r--r-- | server/controllers/api/video-channel.ts | 11 |
2 files changed, 6 insertions, 8 deletions
diff --git a/server/controllers/api/users/index.ts b/server/controllers/api/users/index.ts index a04f77841..2e03587ce 100644 --- a/server/controllers/api/users/index.ts +++ b/server/controllers/api/users/index.ts | |||
@@ -190,8 +190,7 @@ async function createUser (req: express.Request, res: express.Response) { | |||
190 | user: { | 190 | user: { |
191 | id: user.id, | 191 | id: user.id, |
192 | account: { | 192 | account: { |
193 | id: account.id, | 193 | id: account.id |
194 | uuid: account.Actor.uuid | ||
195 | } | 194 | } |
196 | } | 195 | } |
197 | }).end() | 196 | }).end() |
diff --git a/server/controllers/api/video-channel.ts b/server/controllers/api/video-channel.ts index 3d6dbfe70..c98a39be2 100644 --- a/server/controllers/api/video-channel.ts +++ b/server/controllers/api/video-channel.ts | |||
@@ -143,15 +143,14 @@ async function addVideoChannel (req: express.Request, res: express.Response) { | |||
143 | }) | 143 | }) |
144 | 144 | ||
145 | setAsyncActorKeys(videoChannelCreated.Actor) | 145 | setAsyncActorKeys(videoChannelCreated.Actor) |
146 | .catch(err => logger.error('Cannot set async actor keys for account %s.', videoChannelCreated.Actor.uuid, { err })) | 146 | .catch(err => logger.error('Cannot set async actor keys for account %s.', videoChannelCreated.Actor.url, { err })) |
147 | 147 | ||
148 | auditLogger.create(getAuditIdFromRes(res), new VideoChannelAuditView(videoChannelCreated.toFormattedJSON())) | 148 | auditLogger.create(getAuditIdFromRes(res), new VideoChannelAuditView(videoChannelCreated.toFormattedJSON())) |
149 | logger.info('Video channel with uuid %s created.', videoChannelCreated.Actor.uuid) | 149 | logger.info('Video channel %s created.', videoChannelCreated.Actor.url) |
150 | 150 | ||
151 | return res.json({ | 151 | return res.json({ |
152 | videoChannel: { | 152 | videoChannel: { |
153 | id: videoChannelCreated.id, | 153 | id: videoChannelCreated.id |
154 | uuid: videoChannelCreated.Actor.uuid | ||
155 | } | 154 | } |
156 | }).end() | 155 | }).end() |
157 | } | 156 | } |
@@ -180,7 +179,7 @@ async function updateVideoChannel (req: express.Request, res: express.Response) | |||
180 | new VideoChannelAuditView(videoChannelInstanceUpdated.toFormattedJSON()), | 179 | new VideoChannelAuditView(videoChannelInstanceUpdated.toFormattedJSON()), |
181 | oldVideoChannelAuditKeys | 180 | oldVideoChannelAuditKeys |
182 | ) | 181 | ) |
183 | logger.info('Video channel with name %s and uuid %s updated.', videoChannelInstance.name, videoChannelInstance.Actor.uuid) | 182 | logger.info('Video channel %s updated.', videoChannelInstance.Actor.url) |
184 | }) | 183 | }) |
185 | } catch (err) { | 184 | } catch (err) { |
186 | logger.debug('Cannot update the video channel.', { err }) | 185 | logger.debug('Cannot update the video channel.', { err }) |
@@ -205,7 +204,7 @@ async function removeVideoChannel (req: express.Request, res: express.Response) | |||
205 | await videoChannelInstance.destroy({ transaction: t }) | 204 | await videoChannelInstance.destroy({ transaction: t }) |
206 | 205 | ||
207 | auditLogger.delete(getAuditIdFromRes(res), new VideoChannelAuditView(videoChannelInstance.toFormattedJSON())) | 206 | auditLogger.delete(getAuditIdFromRes(res), new VideoChannelAuditView(videoChannelInstance.toFormattedJSON())) |
208 | logger.info('Video channel with name %s and uuid %s deleted.', videoChannelInstance.name, videoChannelInstance.Actor.uuid) | 207 | logger.info('Video channel %s deleted.', videoChannelInstance.Actor.url) |
209 | }) | 208 | }) |
210 | 209 | ||
211 | return res.type('json').status(204).end() | 210 | return res.type('json').status(204).end() |