budibase/packages/server/middleware/controllers/model.js

12 lines
263 B
JavaScript
Raw Normal View History

2020-04-08 17:57:27 +02:00
const couchdb = require("../../db");
const controller = {
create: async ctx => {
const appDatabase = couchdb.db.use(ctx.params.appId)
ctx.body = await appDatabase.insert(ctx.request.body);
},
apply: async ctx => {}
}
module.exports = controller;