From 6b738c7a31591a83fdcd9c78b6b1f98e543c378b Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 25 Apr 2018 10:21:38 +0200 Subject: Video channel API routes refractor --- server/controllers/api/accounts.ts | 4 ++-- server/controllers/api/users.ts | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'server/controllers/api') diff --git a/server/controllers/api/accounts.ts b/server/controllers/api/accounts.ts index 04c5897c5..85987c912 100644 --- a/server/controllers/api/accounts.ts +++ b/server/controllers/api/accounts.ts @@ -126,7 +126,8 @@ async function addVideoChannelRetryWrapper (req: express.Request, res: express.R const videoChannel = await retryTransactionWrapper(addVideoChannel, options) return res.json({ videoChannel: { - id: videoChannel.id + id: videoChannel.id, + uuid: videoChannel.Actor.uuid } }).end() } @@ -233,7 +234,6 @@ async function listVideoChannelVideos (req: express.Request, res: express.Respon return res.json(getFormattedObjects(resultList.data, resultList.total)) } - async function listAccountVideos (req: express.Request, res: express.Response, next: express.NextFunction) { const account: AccountModel = res.locals.account diff --git a/server/controllers/api/users.ts b/server/controllers/api/users.ts index 474329b58..dcc4ef196 100644 --- a/server/controllers/api/users.ts +++ b/server/controllers/api/users.ts @@ -185,7 +185,10 @@ async function createUserRetryWrapper (req: express.Request, res: express.Respon return res.json({ user: { id: user.id, - uuid: account.uuid + account: { + id: account.id, + uuid: account.Actor.uuid + } } }).end() } -- cgit v1.2.3