Formatting.

This commit is contained in:
mike12345567 2021-04-09 16:56:42 +01:00
parent e34894dd92
commit e275553f60
2 changed files with 11 additions and 2 deletions

View File

@ -8,7 +8,11 @@ const { jwt, local, google } = require("./middleware")
const { Cookies, UserStatus } = require("./constants") const { Cookies, UserStatus } = require("./constants")
const { hash, compare } = require("./hashing") const { hash, compare } = require("./hashing")
const { getAppId, setCookie } = require("./utils") const { getAppId, setCookie } = require("./utils")
const { generateUserID, getUserParams, getEmailFromUserID } = require("./db/utils") const {
generateUserID,
getUserParams,
getEmailFromUserID,
} = require("./db/utils")
// Strategies // Strategies
passport.use(new LocalStrategy(local.options, local.authenticate)) passport.use(new LocalStrategy(local.options, local.authenticate))

View File

@ -22,7 +22,12 @@ function buildUserSaveValidation() {
} }
router router
.post("/api/admin/users", buildUserSaveValidation(), authenticated, controller.userSave) .post(
"/api/admin/users",
buildUserSaveValidation(),
authenticated,
controller.userSave
)
.delete("/api/admin/users/:email", authenticated, controller.userDelete) .delete("/api/admin/users/:email", authenticated, controller.userDelete)
.get("/api/admin/users", authenticated, controller.userFetch) .get("/api/admin/users", authenticated, controller.userFetch)
.get("/api/admin/users/:email", authenticated, controller.userFind) .get("/api/admin/users/:email", authenticated, controller.userFind)