2020-07-02 17:53:09 +02:00
|
|
|
const Router = require("@koa/router")
|
|
|
|
const controller = require("../controllers/apikeys")
|
|
|
|
const authorized = require("../../middleware/authorized")
|
2022-01-10 20:33:00 +01:00
|
|
|
const { BUILDER } = require("@budibase/backend-core/permissions")
|
2020-07-02 17:53:09 +02:00
|
|
|
|
|
|
|
const router = Router()
|
|
|
|
|
|
|
|
router
|
2020-07-06 09:07:29 +02:00
|
|
|
.get("/api/keys", authorized(BUILDER), controller.fetch)
|
|
|
|
.put("/api/keys/:key", authorized(BUILDER), controller.update)
|
2020-07-02 17:53:09 +02:00
|
|
|
|
|
|
|
module.exports = router
|