aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r--server/middlewares/validators/runners/runners.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/server/middlewares/validators/runners/runners.ts b/server/middlewares/validators/runners/runners.ts
index 71a1275d2..4d4d79b4c 100644
--- a/server/middlewares/validators/runners/runners.ts
+++ b/server/middlewares/validators/runners/runners.ts
@@ -35,6 +35,15 @@ const registerRunnerValidator = [
35 }) 35 })
36 } 36 }
37 37
38 const existing = await RunnerModel.loadByName(body.name)
39 if (existing) {
40 return res.fail({
41 status: HttpStatusCode.BAD_REQUEST_400,
42 message: 'This runner name already exists on this instance',
43 tags
44 })
45 }
46
38 res.locals.runnerRegistrationToken = runnerRegistrationToken 47 res.locals.runnerRegistrationToken = runnerRegistrationToken
39 48
40 return next() 49 return next()