You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

20 lines
482 B

import Router from "utils/router.js"
class StatusController {
async status(ctx) {
ctx.body = "OK"
}
static createRoutes() {
const controller = new StatusController()
const v1 = new Router({ prefix: "/api/v1" })
v1.use((ctx, next) => {
ctx.set("X-API-Version", "v1")
return next()
})
v1.get("/status", controller.status.bind(controller))
return v1
}
}
export default StatusController