aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-04-12 10:10:48 +0200
committerChocobozzz <me@florianbigard.com>2021-04-12 10:10:48 +0200
commit8280d0c22797c72978f698dc2deaa8ef569a9d15 (patch)
tree8136abd28c9aa0c5050bb66e2f6f7451117b57f2 /server/middlewares
parent90aa0a74e95d390d62942aa72d481d5aa7b5ac23 (diff)
downloadPeerTube-8280d0c22797c72978f698dc2deaa8ef569a9d15.tar.gz
PeerTube-8280d0c22797c72978f698dc2deaa8ef569a9d15.tar.zst
PeerTube-8280d0c22797c72978f698dc2deaa8ef569a9d15.zip
Ensure to install supported plugins
Diffstat (limited to 'server/middlewares')
-rw-r--r--server/middlewares/validators/plugins.ts2
1 files changed, 0 insertions, 2 deletions
diff --git a/server/middlewares/validators/plugins.ts b/server/middlewares/validators/plugins.ts
index 1083e0afa..ab87fe720 100644
--- a/server/middlewares/validators/plugins.ts
+++ b/server/middlewares/validators/plugins.ts
@@ -109,7 +109,6 @@ const installOrUpdatePluginValidator = [
109 if (!body.path && !body.npmName) { 109 if (!body.path && !body.npmName) {
110 return res.status(HttpStatusCode.BAD_REQUEST_400) 110 return res.status(HttpStatusCode.BAD_REQUEST_400)
111 .json({ error: 'Should have either a npmName or a path' }) 111 .json({ error: 'Should have either a npmName or a path' })
112 .end()
113 } 112 }
114 113
115 return next() 114 return next()
@@ -140,7 +139,6 @@ const existingPluginValidator = [
140 if (!plugin) { 139 if (!plugin) {
141 return res.status(HttpStatusCode.NOT_FOUND_404) 140 return res.status(HttpStatusCode.NOT_FOUND_404)
142 .json({ error: 'Plugin not found' }) 141 .json({ error: 'Plugin not found' })
143 .end()
144 } 142 }
145 143
146 res.locals.plugin = plugin 144 res.locals.plugin = plugin