Allow to create a controller decorator with multi endpoints just like NestJS does
Current behavior
// endpoints: /users/:id
@Controller("users")
export class UserController {
@Get(":id")
public async getOneUser() {
// Logic here
}
}
New behavior
// if you need just one endpoint:
// endpoints: /users/:id
@Controller("users")
export class UserController {
@Get(":id")
public async getOneUser() {
// Logic here
}
}
// if you need multiple endpoints:
// endpoints: /users/:id AND /potato/:id
@Controller(["users", "potato"])
export class UserController {
@Get(":id")
public async getOneUser() {
// Logic here
}
}
Allow to create a controller decorator with multi endpoints just like NestJS does
Current behavior
New behavior
Related Issues:
97