2020-05-07 11:53:34 +02:00
|
|
|
const Router = require("@koa/router")
|
|
|
|
const controller = require("../controllers/model")
|
2020-04-08 17:57:27 +02:00
|
|
|
|
2020-05-07 11:53:34 +02:00
|
|
|
const router = Router()
|
2020-04-08 17:57:27 +02:00
|
|
|
|
|
|
|
router
|
2020-04-09 17:53:48 +02:00
|
|
|
.get("/api/:instanceId/models", controller.fetch)
|
|
|
|
.post("/api/:instanceId/models", controller.create)
|
2020-04-13 12:47:53 +02:00
|
|
|
// .patch("/api/:instanceId/models", controller.update)
|
2020-05-07 11:53:34 +02:00
|
|
|
.delete("/api/:instanceId/models/:modelId/:revId", controller.destroy)
|
2020-04-08 17:57:27 +02:00
|
|
|
|
2020-05-07 11:53:34 +02:00
|
|
|
module.exports = router
|