2020-04-07 16:12:08 +02:00
|
|
|
const Router = require("@koa/router");
|
|
|
|
const controller = require("../../controllers/schema");
|
|
|
|
|
|
|
|
const router = Router();
|
|
|
|
|
2020-04-07 18:25:09 +02:00
|
|
|
router
|
2020-04-07 21:34:21 +02:00
|
|
|
.get("/api/:clientId/:appId/schemas", controller.fetch)
|
|
|
|
.post("/api/:clientId/:appId/schemas", controller.save)
|
|
|
|
.patch("/api/:clientId/:appId/schemas/apply", controller.apply)
|
|
|
|
.delete("/api/:clientId/:appId/schemas/:schemaId", controller.delete)
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = router;
|