Formatting and linting.
This commit is contained in:
parent
76ceb6a951
commit
15223080d5
|
@ -31,7 +31,7 @@ module.exports = {
|
||||||
db: require("./db/utils"),
|
db: require("./db/utils"),
|
||||||
utils: {
|
utils: {
|
||||||
...require("./utils"),
|
...require("./utils"),
|
||||||
...require("./hashing")
|
...require("./hashing"),
|
||||||
},
|
},
|
||||||
auth: {
|
auth: {
|
||||||
buildAuthMiddleware: authenticated,
|
buildAuthMiddleware: authenticated,
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
const CouchDB = require("../../../db")
|
const CouchDB = require("../../../db")
|
||||||
const { getGroupParams, generateGroupID, StaticDatabases } = require("@budibase/auth").db
|
const {
|
||||||
|
getGroupParams,
|
||||||
|
generateGroupID,
|
||||||
|
StaticDatabases,
|
||||||
|
} = require("@budibase/auth").db
|
||||||
|
|
||||||
const GLOBAL_DB = StaticDatabases.GLOBAL.name
|
const GLOBAL_DB = StaticDatabases.GLOBAL.name
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,25 @@
|
||||||
const { generateTemplateID, getTemplateParams } = require("@budibase/auth").db
|
// const { generateTemplateID, getTemplateParams, StaticDatabases } = require("@budibase/auth").db
|
||||||
const { CouchDB } = require("../../../db")
|
// const { CouchDB } = require("../../../db")
|
||||||
|
|
||||||
|
// const GLOBAL_DB = StaticDatabases.GLOBAL.name
|
||||||
|
|
||||||
exports.save = async ctx => {
|
exports.save = async ctx => {
|
||||||
|
// const db = new CouchDB(GLOBAL_DB)
|
||||||
|
// const id = generateTemplateID()
|
||||||
|
ctx.body = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.fetch = async ctx => {
|
exports.fetch = async ctx => {
|
||||||
|
// const db = new CouchDB(GLOBAL_DB)
|
||||||
|
ctx.body = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.find = async ctx => {
|
exports.find = async ctx => {
|
||||||
|
// const db = new CouchDB(GLOBAL_DB)
|
||||||
|
ctx.body = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.destroy = async ctx => {
|
exports.destroy = async ctx => {
|
||||||
|
// const db = new CouchDB(GLOBAL_DB)
|
||||||
|
ctx.body = {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,11 +24,7 @@ function buildGroupSaveValidation() {
|
||||||
}
|
}
|
||||||
|
|
||||||
router
|
router
|
||||||
.post(
|
.post("/api/admin/groups", buildGroupSaveValidation(), controller.save)
|
||||||
"/api/admin/groups",
|
|
||||||
buildGroupSaveValidation(),
|
|
||||||
controller.save
|
|
||||||
)
|
|
||||||
.get("/api/admin/groups", controller.fetch)
|
.get("/api/admin/groups", controller.fetch)
|
||||||
.delete("/api/admin/groups/:id", controller.destroy)
|
.delete("/api/admin/groups/:id", controller.destroy)
|
||||||
.get("/api/admin/groups/:id", controller.find)
|
.get("/api/admin/groups/:id", controller.find)
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
const Router = require("@koa/router")
|
const Router = require("@koa/router")
|
||||||
const controller = require("../../controllers/admin/templates")
|
const controller = require("../../controllers/admin/templates")
|
||||||
const joiValidator = require("../../../middleware/joi-validator")
|
// const joiValidator = require("../../../middleware/joi-validator")
|
||||||
const Joi = require("joi")
|
// const Joi = require("joi")
|
||||||
|
|
||||||
const router = Router()
|
const router = Router()
|
||||||
|
|
||||||
function buildTemplateSaveValidation() {
|
function buildTemplateSaveValidation() {}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
router
|
router
|
||||||
.post(
|
.post(
|
||||||
|
|
|
@ -25,11 +25,7 @@ function buildUserSaveValidation() {
|
||||||
}
|
}
|
||||||
|
|
||||||
router
|
router
|
||||||
.post(
|
.post("/api/admin/users", buildUserSaveValidation(), controller.userSave)
|
||||||
"/api/admin/users",
|
|
||||||
buildUserSaveValidation(),
|
|
||||||
controller.userSave
|
|
||||||
)
|
|
||||||
.get("/api/admin/users", controller.userFetch)
|
.get("/api/admin/users", controller.userFetch)
|
||||||
.post("/api/admin/users/first", controller.firstUser)
|
.post("/api/admin/users/first", controller.firstUser)
|
||||||
.delete("/api/admin/users/:id", controller.userDelete)
|
.delete("/api/admin/users/:id", controller.userDelete)
|
||||||
|
|
Loading…
Reference in New Issue