13 lines
401 B
JavaScript
13 lines
401 B
JavaScript
const Router = require("@koa/router")
|
|
const controller = require("../controllers/record")
|
|
|
|
const router = Router()
|
|
|
|
router
|
|
.get("/api/:instanceId/:viewName/records", controller.fetch)
|
|
.get("/api/:instanceId/records/:recordId", controller.find)
|
|
.post("/api/:instanceId/records", controller.save)
|
|
.delete("/api/:instanceId/records/:recordId/:revId", controller.destroy)
|
|
|
|
module.exports = router
|