2020-05-07 11:53:34 +02:00
|
|
|
const Router = require("@koa/router")
|
|
|
|
const controller = require("../controllers/component")
|
2020-05-21 15:31:23 +02:00
|
|
|
const authorized = require("../../middleware/authorized")
|
2020-11-11 18:34:15 +01:00
|
|
|
const { BUILDER } = require("../../utilities/security/permissions")
|
2020-05-02 16:29:10 +02:00
|
|
|
|
2020-05-07 11:53:34 +02:00
|
|
|
const router = Router()
|
2020-05-02 16:29:10 +02:00
|
|
|
|
2020-05-07 11:53:34 +02:00
|
|
|
router.get(
|
2021-04-01 13:02:31 +02:00
|
|
|
"/api/:appId/components/definitions",
|
2020-05-21 15:31:23 +02:00
|
|
|
authorized(BUILDER),
|
2020-05-07 11:53:34 +02:00
|
|
|
controller.fetchAppComponentDefinitions
|
|
|
|
)
|
2020-05-02 16:29:10 +02:00
|
|
|
|
2020-05-07 11:53:34 +02:00
|
|
|
module.exports = router
|