budibase/packages/server/src/api/routes/screen.js

14 lines
482 B
JavaScript
Raw Normal View History

2020-05-07 11:53:34 +02:00
const Router = require("@koa/router")
const controller = require("../controllers/screen")
2020-05-21 15:31:23 +02:00
const authorized = require("../../middleware/authorized")
const { BUILDER } = require("../../utilities/accessLevels")
2020-05-07 11:53:34 +02:00
const router = Router()
router
2020-11-03 17:27:28 +01:00
.get("/api/:pageId/screens", authorized(BUILDER), controller.fetch)
.post("/api/:pageId/screens", authorized(BUILDER), controller.save)
2020-06-18 17:59:31 +02:00
.delete("/api/:screenId/:revId", authorized(BUILDER), controller.destroy)
2020-05-07 11:53:34 +02:00
module.exports = router