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

11 lines
262 B
JavaScript
Raw Normal View History

2020-04-07 18:25:09 +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;