@hvedinich/utils 0.0.69 → 0.0.70
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.
- package/package.json +1 -1
- package/src/server/index.js +3 -1
package/package.json
CHANGED
package/src/server/index.js
CHANGED
|
@@ -111,7 +111,9 @@ class Server {
|
|
|
111
111
|
|
|
112
112
|
addEndpoints(endpoints) {
|
|
113
113
|
endpoints.forEach(({ path, method, handler, proxy }) => {
|
|
114
|
-
if (proxy) {
|
|
114
|
+
if (path && method && handler && proxy) {
|
|
115
|
+
this.app[method](path, proxy, handler);
|
|
116
|
+
} else if (proxy) {
|
|
115
117
|
this.app.use(path, proxy);
|
|
116
118
|
} else {
|
|
117
119
|
this.app[method](path, handler);
|