aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-04-14 10:55:34 +0200
committerRigel Kent <par@rigelk.eu>2020-04-14 15:53:37 +0200
commitbb152476c819e4c7487d080433c616f0d523e049 (patch)
tree955b6afa140b6e83eced3cb21c8ec1d62fa6a15e /server/middlewares/validators
parent1055eb3a7b89bc50dc611ab933f9dbd603488747 (diff)
downloadPeerTube-bb152476c819e4c7487d080433c616f0d523e049.tar.gz
PeerTube-bb152476c819e4c7487d080433c616f0d523e049.tar.zst
PeerTube-bb152476c819e4c7487d080433c616f0d523e049.zip
Refactor follow/mute as modals in admin, add actions in abuse list
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r--server/middlewares/validators/blocklist.ts6
1 files changed, 2 insertions, 4 deletions
diff --git a/server/middlewares/validators/blocklist.ts b/server/middlewares/validators/blocklist.ts
index 47a0b1a1c..b2183437c 100644
--- a/server/middlewares/validators/blocklist.ts
+++ b/server/middlewares/validators/blocklist.ts
@@ -84,11 +84,9 @@ const blockServerValidator = [
84 .end() 84 .end()
85 } 85 }
86 86
87 const server = await ServerModel.loadByHost(host) 87 let server = await ServerModel.loadByHost(host)
88 if (!server) { 88 if (!server) {
89 return res.status(404) 89 server = await ServerModel.create({ host })
90 .send({ error: 'Server host not found.' })
91 .end()
92 } 90 }
93 91
94 res.locals.server = server 92 res.locals.server = server