Merge branch 'feature/global-user-management' of github.com:Budibase/budibase into feature/global-user-management

This commit is contained in:
mike12345567 2021-04-08 17:00:17 +01:00
commit bf25800445
4 changed files with 10 additions and 4 deletions

View File

@ -1,7 +1,5 @@
const Router = require("@koa/router")
const passport = require("@budibase/auth")
const controller = require("../../controllers/admin")
const authController = require("../../controllers/admin/auth")
const authenticated = require("../../../middleware/authenticated")
const joiValidator = require("../../../middleware/joi-validator")
const Joi = require("joi")
@ -25,7 +23,6 @@ function buildUserSaveValidation() {
router
.post("/api/admin/users", buildUserSaveValidation(), authenticated, controller.userSave)
.post("/api/admin/authenticate", authController.authenticate)
.delete("/api/admin/users/:email", authenticated, controller.userDelete)
.get("/api/admin/users", authenticated, controller.userFetch)
.get("/api/admin/users/:email", authenticated, controller.userFind)

View File

@ -0,0 +1,8 @@
const Router = require("@koa/router")
const authController = require("../controllers/auth")
const router = Router()
router.post("/api/auth/authenticate", authController.authenticate)
module.exports = router

View File

@ -1,4 +1,5 @@
const adminRoutes = require("./admin")
const authRoutes = require("./auth")
const appRoutes = require("./app")
exports.routes = [adminRoutes, appRoutes]
exports.routes = [adminRoutes, authRoutes, appRoutes]