budibase/packages/server/middleware/routes/user.js

33 lines
787 B
JavaScript
Raw Normal View History

2020-04-03 17:15:53 +02:00
const Router = require("@koa/router")
const routeHandlers = require("../routeHandlers")
const router = new Router()
router.post("/:appname/api/authenticate", routeHandlers.authenticate)
router.post(
"/_builder/instance/:appname/:instanceid/api/authenticate",
routeHandlers.authenticate
)
router.post(
"/_builder/instance/:appname/:instanceid/api/setPasswordFromTemporaryCode",
routeHandlers.setPasswordFromTemporaryCode
)
router.post(
"/_builder/instance/:appname/:instanceid/api/createTemporaryAccess",
routeHandlers.createTemporaryAccess
)
router.post(
"/:appname/api/createTemporaryAccess",
routeHandlers.createTemporaryAccess
)
router.post(
"/:appname/api/setPasswordFromTemporaryCode",
routeHandlers.setPasswordFromTemporaryCode
)
module.exports = router