Formatting.

This commit is contained in:
mike12345567 2021-04-09 16:56:42 +01:00
parent dc62087dad
commit ac1f391383
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 { hash, compare } = require("./hashing")
const { getAppId, setCookie } = require("./utils")
const { generateUserID, getUserParams, getEmailFromUserID } = require("./db/utils")
const {
generateUserID,
getUserParams,
getEmailFromUserID,
} = require("./db/utils")
// Strategies
passport.use(new LocalStrategy(local.options, local.authenticate))

View File

@ -22,7 +22,12 @@ function buildUserSaveValidation() {
}
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)
.get("/api/admin/users", authenticated, controller.userFetch)
.get("/api/admin/users/:email", authenticated, controller.userFind)