2020-04-22 17:35:20 +02:00
|
|
|
const Router = require("@koa/router")
|
2020-05-04 18:13:57 +02:00
|
|
|
const controller = require("../controllers/record")
|
2020-04-07 16:12:08 +02:00
|
|
|
|
2020-04-22 17:35:20 +02:00
|
|
|
const router = Router()
|
2020-04-07 16:12:08 +02:00
|
|
|
|
2020-04-14 16:14:57 +02:00
|
|
|
router
|
2020-04-28 15:39:35 +02:00
|
|
|
.get("/api/:instanceId/:viewName/records", controller.fetch)
|
2020-04-20 17:17:11 +02:00
|
|
|
.get("/api/:instanceId/records/:recordId", controller.find)
|
2020-04-22 17:35:20 +02:00
|
|
|
.post("/api/:instanceId/records", controller.save)
|
|
|
|
.delete("/api/:instanceId/records/:recordId/:revId", controller.destroy)
|
2020-04-07 16:12:08 +02:00
|
|
|
|
2020-04-22 17:35:20 +02:00
|
|
|
module.exports = router
|