budibase/packages/server/middleware/routes/neo/database.js

11 lines
305 B
JavaScript
Raw Normal View History

2020-04-07 16:12:08 +02:00
const Router = require("@koa/router");
const controller = require("../../controllers/database");
2020-04-07 18:25:09 +02:00
2020-04-07 16:12:08 +02:00
const router = Router();
router
.get("/api/databases", controller.fetch)
2020-04-07 16:12:08 +02:00
.post("/api/databases", controller.create)
2020-04-07 18:25:09 +02:00
.delete("/api/databases/:databaseId", controller.destroy);
2020-04-07 16:12:08 +02:00
module.exports = router;