我想完全覆盖控制器路由。例如:
@Controller('shipments')
export class ShipmentsController {
@Post('/create')
async find(): Promise<Activities> {
return service.find()
}
}
为了向前面的示例发出请求,URL 将是:http://localhost:8080/shipments/create
我想在不将控制器移动到另一个类的情况下更改该 URL。例如,我希望该特定函数的 URL 为 http://localhost:8080/whatever/i/want。
这可能吗?