From 428a9e5ba3266abcda59d7f49cc89ef32e4ec83c Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 24 May 2021 14:56:23 +0100 Subject: [PATCH] Formatting. --- packages/auth/src/redis/index.js | 2 +- packages/worker/src/api/routes/admin/users.js | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/packages/auth/src/redis/index.js b/packages/auth/src/redis/index.js index 0fd0aa8c83..7a1b9a3431 100644 --- a/packages/auth/src/redis/index.js +++ b/packages/auth/src/redis/index.js @@ -21,7 +21,7 @@ function retryConnection() { */ function init() { function errorOccurred(err) { - CONNECTED = false; + CONNECTED = false console.error("Redis connection failed - " + err) setTimeout(() => { init() diff --git a/packages/worker/src/api/routes/admin/users.js b/packages/worker/src/api/routes/admin/users.js index cfff67f3e7..eff873a7b3 100644 --- a/packages/worker/src/api/routes/admin/users.js +++ b/packages/worker/src/api/routes/admin/users.js @@ -7,10 +7,14 @@ const Joi = require("joi") const router = Router() function buildAdminInitValidation() { - return joiValidator.body(Joi.object({ - email: Joi.string().required(), - password: Joi.string().required(), - }).required().unknown(false)) + return joiValidator.body( + Joi.object({ + email: Joi.string().required(), + password: Joi.string().required(), + }) + .required() + .unknown(false) + ) } function buildUserSaveValidation(isSelf = false) { @@ -81,7 +85,11 @@ router buildInviteAcceptValidation(), controller.inviteAccept ) - .post("/api/admin/users/init", buildAdminInitValidation(), controller.adminUser) + .post( + "/api/admin/users/init", + buildAdminInitValidation(), + controller.adminUser + ) .get("/api/admin/users/self", controller.getSelf) // admin endpoint but needs to come at end (blocks other endpoints otherwise) .get("/api/admin/users/:id", adminOnly, controller.find)