budibase/packages/server/api/routes/record.js

13 lines
401 B
JavaScript
Raw Normal View History

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
router
.get("/api/:instanceId/:viewName/records", controller.fetch)
.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