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
|
2020-04-08 12:18:30 +02:00
|
|
|
.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;
|