badmfck-api-server 1.2.8 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -111,7 +111,7 @@ class APIService extends BaseService_1.BaseService {
|
|
111
111
|
if (!i.endpoints)
|
112
112
|
continue;
|
113
113
|
for (let j of i.endpoints) {
|
114
|
-
const ep = j.endpoint;
|
114
|
+
const ep = BaseEndpoint_1.BaseEndpoint.getEntryPoint() + j.endpoint;
|
115
115
|
app.all(ep, async (req, res) => {
|
116
116
|
const tme = +new Date();
|
117
117
|
let log = null;
|
@@ -34,7 +34,7 @@ class BaseEndpoint {
|
|
34
34
|
i.endpoint = i.endpoint.substring(1);
|
35
35
|
if (i.endpoint.endsWith("/"))
|
36
36
|
i.endpoint = i.endpoint.substring(0, i.endpoint.length - 1);
|
37
|
-
i.endpoint =
|
37
|
+
i.endpoint = this.endpoint + i.endpoint;
|
38
38
|
}
|
39
39
|
this.endpoints = endpoints;
|
40
40
|
}
|
@@ -50,7 +50,7 @@ class BaseEndpoint {
|
|
50
50
|
async execute(req) {
|
51
51
|
if (this.endpoints && this.endpoints.length > 0) {
|
52
52
|
for (let i of this.endpoints) {
|
53
|
-
if (i.endpoint === req.endpoint)
|
53
|
+
if (BaseEndpoint.entrypoint + i.endpoint === req.endpoint)
|
54
54
|
return i.handler(req);
|
55
55
|
}
|
56
56
|
}
|