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")
|
|
|
|
const { BUILDER } = require("../../utilities/accessLevels")
|
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(
|
2020-05-18 07:40:29 +02:00
|
|
|
"/: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
|