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

11 lines
262 B
JavaScript

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;