support for useRoute static

This commit is contained in:
srgooglo 2022-12-02 08:57:32 +01:00
parent eb450809d7
commit 3fb1d7dd33

View File

@ -42,6 +42,10 @@ class Controller {
fn: fn, fn: fn,
} }
if (typeof this.constructor.useRoute === "string") {
endpoint.route = this.constructor.useRoute + endpoint.route
}
if (typeof fn === "object") { if (typeof fn === "object") {
endpoint.middlewares = fn.middlewares endpoint.middlewares = fn.middlewares
endpoint.fn = fn.fn endpoint.fn = fn.fn