2021-09-27 20:12:41 +02:00
|
|
|
const Router = require("@koa/router")
|
|
|
|
const controller = require("../controllers/cloud")
|
|
|
|
const authorized = require("../../middleware/authorized")
|
2022-01-10 20:33:00 +01:00
|
|
|
const { BUILDER } = require("@budibase/backend-core/permissions")
|
2021-09-27 20:12:41 +02:00
|
|
|
|
|
|
|
const router = Router()
|
|
|
|
|
|
|
|
router
|
|
|
|
.get("/api/cloud/export", authorized(BUILDER), controller.exportApps)
|
|
|
|
// has to be public, only run if apps don't exist
|
|
|
|
.post("/api/cloud/import", controller.importApps)
|
2021-10-08 19:21:40 +02:00
|
|
|
.get("/api/cloud/import/complete", controller.hasBeenImported)
|
2021-09-27 20:12:41 +02:00
|
|
|
|
|
|
|
module.exports = router
|