From 403ee4a870d083d4a43c8afa08653ef1048fa748 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 5 May 2021 15:19:44 +0100 Subject: [PATCH] Formatting. --- packages/worker/src/api/controllers/admin/auth.js | 5 ++++- packages/worker/src/api/controllers/admin/users.js | 2 +- packages/worker/src/api/routes/admin/auth.js | 6 +++++- packages/worker/src/api/routes/admin/users.js | 6 +++++- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/packages/worker/src/api/controllers/admin/auth.js b/packages/worker/src/api/controllers/admin/auth.js index 386b1f4a88..04c835a2e7 100644 --- a/packages/worker/src/api/controllers/admin/auth.js +++ b/packages/worker/src/api/controllers/admin/auth.js @@ -47,7 +47,10 @@ exports.reset = async ctx => { const { email } = ctx.request.body const configured = await isEmailConfigured() if (!configured) { - ctx.throw(400, "Please contact your platform administrator, SMTP is not configured.") + ctx.throw( + 400, + "Please contact your platform administrator, SMTP is not configured." + ) } try { const user = await getGlobalUserByEmail(email) diff --git a/packages/worker/src/api/controllers/admin/users.js b/packages/worker/src/api/controllers/admin/users.js index 48a20141a3..cd307bbc6b 100644 --- a/packages/worker/src/api/controllers/admin/users.js +++ b/packages/worker/src/api/controllers/admin/users.js @@ -132,7 +132,7 @@ exports.invite = async ctx => { } await sendEmail(email, EmailTemplatePurpose.INVITATION) ctx.body = { - message: "Invitation has been sent." + message: "Invitation has been sent.", } } diff --git a/packages/worker/src/api/routes/admin/auth.js b/packages/worker/src/api/routes/admin/auth.js index 8f109417ff..04e30fc006 100644 --- a/packages/worker/src/api/routes/admin/auth.js +++ b/packages/worker/src/api/routes/admin/auth.js @@ -31,7 +31,11 @@ function buildResetUpdateValidation() { router .post("/api/admin/auth", buildAuthValidation(), authController.authenticate) .post("/api/admin/auth/reset", buildResetValidation(), authController.reset) - .post("/api/admin/auth/reset/update", buildResetUpdateValidation(), authController.resetUpdate) + .post( + "/api/admin/auth/reset/update", + buildResetUpdateValidation(), + authController.resetUpdate + ) .post("/api/admin/auth/logout", authController.logout) .get("/api/admin/auth/google", authController.googlePreAuth) .get("/api/admin/auth/google/callback", authController.googleAuth) diff --git a/packages/worker/src/api/routes/admin/users.js b/packages/worker/src/api/routes/admin/users.js index a5e2d9f87e..c15b43bd4f 100644 --- a/packages/worker/src/api/routes/admin/users.js +++ b/packages/worker/src/api/routes/admin/users.js @@ -46,6 +46,10 @@ router .delete("/api/admin/users/:id", controller.destroy) .get("/api/admin/users/:id", controller.find) .post("/api/admin/users/invite", buildInviteValidation(), controller.invite) - .post("/api/admin/users/invite/accept", buildInviteAcceptValidation(), controller.inviteAccept) + .post( + "/api/admin/users/invite/accept", + buildInviteAcceptValidation(), + controller.inviteAccept + ) module.exports = router