Formatting and linting.

This commit is contained in:
mike12345567 2021-04-21 16:46:51 +01:00
parent bb5dbf27aa
commit ec099a9e6f
6 changed files with 24 additions and 23 deletions

View File

@ -31,7 +31,7 @@ module.exports = {
db: require("./db/utils"),
utils: {
...require("./utils"),
...require("./hashing")
...require("./hashing"),
},
auth: {
buildAuthMiddleware: authenticated,

View File

@ -1,5 +1,9 @@
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

View File

@ -1,18 +1,25 @@
const { generateTemplateID, getTemplateParams } = require("@budibase/auth").db
const { CouchDB } = require("../../../db")
// const { generateTemplateID, getTemplateParams, StaticDatabases } = require("@budibase/auth").db
// const { CouchDB } = require("../../../db")
// const GLOBAL_DB = StaticDatabases.GLOBAL.name
exports.save = async ctx => {
// const db = new CouchDB(GLOBAL_DB)
// const id = generateTemplateID()
ctx.body = {}
}
exports.fetch = async ctx => {
// const db = new CouchDB(GLOBAL_DB)
ctx.body = {}
}
exports.find = async ctx => {
// const db = new CouchDB(GLOBAL_DB)
ctx.body = {}
}
exports.destroy = async ctx => {
// const db = new CouchDB(GLOBAL_DB)
ctx.body = {}
}

View File

@ -24,11 +24,7 @@ function buildGroupSaveValidation() {
}
router
.post(
"/api/admin/groups",
buildGroupSaveValidation(),
controller.save
)
.post("/api/admin/groups", buildGroupSaveValidation(), controller.save)
.get("/api/admin/groups", controller.fetch)
.delete("/api/admin/groups/:id", controller.destroy)
.get("/api/admin/groups/:id", controller.find)

View File

@ -1,13 +1,11 @@
const Router = require("@koa/router")
const controller = require("../../controllers/admin/templates")
const joiValidator = require("../../../middleware/joi-validator")
const Joi = require("joi")
// const joiValidator = require("../../../middleware/joi-validator")
// const Joi = require("joi")
const router = Router()
function buildTemplateSaveValidation() {
}
function buildTemplateSaveValidation() {}
router
.post(

View File

@ -25,11 +25,7 @@ function buildUserSaveValidation() {
}
router
.post(
"/api/admin/users",
buildUserSaveValidation(),
controller.userSave
)
.post("/api/admin/users", buildUserSaveValidation(), controller.userSave)
.get("/api/admin/users", controller.userFetch)
.post("/api/admin/users/first", controller.firstUser)
.delete("/api/admin/users/:id", controller.userDelete)