aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares')
-rw-r--r--server/middlewares/validators/blocklist.ts5
1 files changed, 1 insertions, 4 deletions
diff --git a/server/middlewares/validators/blocklist.ts b/server/middlewares/validators/blocklist.ts
index c00a7e4df..27224ff9b 100644
--- a/server/middlewares/validators/blocklist.ts
+++ b/server/middlewares/validators/blocklist.ts
@@ -84,10 +84,7 @@ const blockServerValidator = [
84 .end() 84 .end()
85 } 85 }
86 86
87 let server = await ServerModel.loadByHost(host) 87 const server = await ServerModel.loadOrCreateByHost(host)
88 if (!server) {
89 server = await ServerModel.create({ host })
90 }
91 88
92 res.locals.server = server 89 res.locals.server = server
93 90