diff options
author | Chocobozzz <me@florianbigard.com> | 2021-05-12 14:51:17 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-05-12 16:57:31 +0200 |
commit | c158a5faabb8ef0bc5d121fda4522d63603e8bc5 (patch) | |
tree | ca0a7f25a8806805deeb48f48642ec60696256ce /server/controllers/api/videos/ownership.ts | |
parent | c00100b607ab97dfea690880434657b7ee11466d (diff) | |
download | PeerTube-c158a5faabb8ef0bc5d121fda4522d63603e8bc5.tar.gz PeerTube-c158a5faabb8ef0bc5d121fda4522d63603e8bc5.tar.zst PeerTube-c158a5faabb8ef0bc5d121fda4522d63603e8bc5.zip |
Refactor a little bit controllers
Diffstat (limited to 'server/controllers/api/videos/ownership.ts')
-rw-r--r-- | server/controllers/api/videos/ownership.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/api/videos/ownership.ts b/server/controllers/api/videos/ownership.ts index a85d7c30b..6102f28dc 100644 --- a/server/controllers/api/videos/ownership.ts +++ b/server/controllers/api/videos/ownership.ts | |||
@@ -99,7 +99,7 @@ async function listVideoOwnership (req: express.Request, res: express.Response) | |||
99 | return res.json(getFormattedObjects(resultList.data, resultList.total)) | 99 | return res.json(getFormattedObjects(resultList.data, resultList.total)) |
100 | } | 100 | } |
101 | 101 | ||
102 | async function acceptOwnership (req: express.Request, res: express.Response) { | 102 | function acceptOwnership (req: express.Request, res: express.Response) { |
103 | return sequelizeTypescript.transaction(async t => { | 103 | return sequelizeTypescript.transaction(async t => { |
104 | const videoChangeOwnership = res.locals.videoChangeOwnership | 104 | const videoChangeOwnership = res.locals.videoChangeOwnership |
105 | const channel = res.locals.videoChannel | 105 | const channel = res.locals.videoChannel |
@@ -126,7 +126,7 @@ async function acceptOwnership (req: express.Request, res: express.Response) { | |||
126 | }) | 126 | }) |
127 | } | 127 | } |
128 | 128 | ||
129 | async function refuseOwnership (req: express.Request, res: express.Response) { | 129 | function refuseOwnership (req: express.Request, res: express.Response) { |
130 | return sequelizeTypescript.transaction(async t => { | 130 | return sequelizeTypescript.transaction(async t => { |
131 | const videoChangeOwnership = res.locals.videoChangeOwnership | 131 | const videoChangeOwnership = res.locals.videoChangeOwnership |
132 | 132 | ||