diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2021-06-01 01:36:53 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-06-02 16:57:07 +0200 |
commit | 76148b27f7501bac061992136852be4303370c8d (patch) | |
tree | fc0559253e833c9252fa14ebaec5321d88bfb4e8 /server/helpers/middlewares/video-playlists.ts | |
parent | 5ed25fb76e920dac364cb9ef46f14ec4bd372949 (diff) | |
download | PeerTube-76148b27f7501bac061992136852be4303370c8d.tar.gz PeerTube-76148b27f7501bac061992136852be4303370c8d.tar.zst PeerTube-76148b27f7501bac061992136852be4303370c8d.zip |
refactor API errors to standard error format
Diffstat (limited to 'server/helpers/middlewares/video-playlists.ts')
-rw-r--r-- | server/helpers/middlewares/video-playlists.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/helpers/middlewares/video-playlists.ts b/server/helpers/middlewares/video-playlists.ts index d2dd80a35..3faeab677 100644 --- a/server/helpers/middlewares/video-playlists.ts +++ b/server/helpers/middlewares/video-playlists.ts | |||
@@ -28,10 +28,10 @@ export { | |||
28 | 28 | ||
29 | function handleVideoPlaylist (videoPlaylist: MVideoPlaylist, res: express.Response) { | 29 | function handleVideoPlaylist (videoPlaylist: MVideoPlaylist, res: express.Response) { |
30 | if (!videoPlaylist) { | 30 | if (!videoPlaylist) { |
31 | res.status(HttpStatusCode.NOT_FOUND_404) | 31 | res.fail({ |
32 | .json({ error: 'Video playlist not found' }) | 32 | status: HttpStatusCode.NOT_FOUND_404, |
33 | .end() | 33 | message: 'Video playlist not found' |
34 | 34 | }) | |
35 | return false | 35 | return false |
36 | } | 36 | } |
37 | 37 | ||