1
0
Fork 0
mirror of synced 2024-07-02 13:01:09 +12:00
budibase/packages/server/middleware/controllers/record.js

18 lines
368 B
JavaScript
Raw Normal View History

2020-04-08 02:12:08 +12:00
const couchdb = require("../../db");
const controller = {
save: async ctx => {
},
fetch: async ctx => {
const databaseId = ctx.params.databaseId;
const instance = couchdb.db.use(databaseId)
const documents = await instance.list({});
ctx.status = 200;
ctx.body = documents;
},
destroy: async ctx => {
},
}
module.exports = controller;