You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get a weird error when trying to use flexirest on non-static methods:
pocketflint | /usr/src/pocketflint/node_modules/loopback-connector-flexirest/index.js:155
pocketflint | cb(err, body, response);
pocketflint | ^
pocketflint |
pocketflint | TypeError: cb is not a function
pocketflint | at /usr/src/pocketflint/node_modules/loopback-connector-flexirest/index.js:155:33
pocketflint | at /usr/src/pocketflint/node_modules/loopback-datasource-juggler/lib/observer.js:172:22
pocketflint | at doNotify (/usr/src/pocketflint/node_modules/loopback-datasource-juggler/lib/observer.js:99:49)
pocketflint | at RestConnector.ObserverMixin._notifyBaseObservers (/usr/src/pocketflint/node_modules/loopback-datasource-juggler/lib/observer.js:122:5)
pocketflint | at RestConnector.ObserverMixin.notifyObserversOf (/usr/src/pocketflint/node_modules/loopback-datasource-juggler/lib/observer.js:97:8)
pocketflint | at cbForWork (/usr/src/pocketflint/node_modules/loopback-datasource-juggler/lib/observer.js:162:14)
pocketflint | at incomingTransform (/usr/src/pocketflint/node_modules/loopback-connector-flexirest/index.js:134:17)
pocketflint | at /usr/src/pocketflint/node_modules/loopback-datasource-juggler/lib/observer.js:181:9
pocketflint | at doNotify (/usr/src/pocketflint/node_modules/loopback-datasource-juggler/lib/observer.js:99:49)
pocketflint | at RestConnector.ObserverMixin._notifyBaseObservers (/usr/src/pocketflint/node_modules/loopback-datasource-juggler/lib/observer.js:122:5)
pocketflint | at RestConnector.ObserverMixin.notifyObserversOf (/usr/src/pocketflint/node_modules/loopback-datasource-juggler/lib/observer.js:97:8)
pocketflint | at RestConnector.ObserverMixin.notifyObserversAround (/usr/src/pocketflint/node_modules/loopback-datasource-juggler/lib/observer.js:150:15)
pocketflint | at /usr/src/pocketflint/node_modules/loopback-connector-flexirest/index.js:154:39
pocketflint | at errorHandler (/usr/src/pocketflint/node_modules/loopback-connector-flexirest/index.js:120:21)
pocketflint | at callback (/usr/src/pocketflint/node_modules/loopback-connector-flexirest/index.js:148:21)
pocketflint | at callback (/usr/src/pocketflint/node_modules/loopback-connector-flexirest/node_modules/loopback-connector-rest/lib/rest-builder.js:551:16)
The text was updated successfully, but these errors were encountered:
I use flexirest to define a static method: /model/:id/ and a non-static method /model/:id/method. Calling /model/:id/method implicitly makes a call to /model/:id/ but has different arguments (4) instead of the normal 2. I needed to write wrapper methods to handle this, but an example should be added for overwriting existing methods.
I get a weird error when trying to use flexirest on non-static methods:
The text was updated successfully, but these errors were encountered: