2020-05-07 11:53:34 +02:00
|
|
|
const Router = require("@koa/router")
|
|
|
|
const controller = require("../controllers/user")
|
2020-04-29 21:29:42 +02:00
|
|
|
|
2020-05-07 11:53:34 +02:00
|
|
|
const router = Router()
|
2020-04-29 21:29:42 +02:00
|
|
|
|
2020-05-04 18:13:57 +02:00
|
|
|
router
|
|
|
|
.get("/api/:instanceId/users", controller.fetch)
|
2020-05-04 19:07:03 +02:00
|
|
|
.post("/api/:appId/:instanceId/users", controller.create)
|
2020-05-07 11:53:34 +02:00
|
|
|
.delete("/api/:instanceId/users/:userId", controller.destroy)
|
2020-04-29 21:29:42 +02:00
|
|
|
|
2020-05-07 11:53:34 +02:00
|
|
|
module.exports = router
|