Formatting.
This commit is contained in:
parent
5d2c1c23aa
commit
48236b2c2f
|
@ -48,9 +48,12 @@ exports.save = async function (ctx) {
|
|||
exports.fetch = async function (ctx) {
|
||||
const db = new CouchDB(GLOBAL_DB)
|
||||
const response = await db.allDocs(
|
||||
getConfigParams({ type: ctx.params.type }, {
|
||||
include_docs: true,
|
||||
})
|
||||
getConfigParams(
|
||||
{ type: ctx.params.type },
|
||||
{
|
||||
include_docs: true,
|
||||
}
|
||||
)
|
||||
)
|
||||
ctx.body = response.rows.map(row => row.doc)
|
||||
}
|
||||
|
|
|
@ -68,7 +68,11 @@ function buildConfigGetValidation() {
|
|||
router
|
||||
.post("/api/admin/configs", buildConfigSaveValidation(), controller.save)
|
||||
.delete("/api/admin/configs/:id", controller.destroy)
|
||||
.get("/api/admin/configs/all/:type", buildConfigGetValidation(), controller.fetch)
|
||||
.get(
|
||||
"/api/admin/configs/all/:type",
|
||||
buildConfigGetValidation(),
|
||||
controller.fetch
|
||||
)
|
||||
.get("/api/admin/configs/:type", buildConfigGetValidation(), controller.find)
|
||||
|
||||
module.exports = router
|
||||
|
|
Loading…
Reference in New Issue