Commit Graph

18 Commits

Author SHA1 Message Date
Miroslav Bajtoš f9702b0ace Use eslint with loopback config
Drop jshint and jscs in favour of eslint.

Fix style violations.

While we are at this, reduce the max line length from 150 to 100.
2016-04-06 10:45:30 +02:00
Simon Ho 26af1472e7 Check configs for shared method settings 2015-09-28 16:27:48 -07:00
Miroslav Bajtoš 699bc7aa97 test: remove global autoAttach 2015-04-07 15:25:18 +02:00
Ron Edgecomb 1818a8fb34 Config option to disable legacy explorer routes
Setting legacyExplorer to false in the loopback config will disable
the routes /routes and /models made available in loopback.rest.
The deprecate module has been added to the project with a reference
added for the legacyExplorer option as it is no longer required by
loopback-explorer. Tests added to validate functionality of disabled
and enabled legacy explorer routes.
2015-03-02 14:12:18 -05:00
Pradnya Baviskar b27b13071a Add test case to demonstrate url-encoded http path 2015-01-23 18:34:13 +05:30
Pradnya Baviskar 7dcc2fcb1c Add test case for loopback issue #698
Verify that the following model options change the HTTP path
where the model is exposed:

    { http: { path: 'domain/mymodels' } }
2015-01-22 18:40:47 +01:00
Ron Edgecomb a028d9d198 Add error code property to known error responses.
Enhance the error objects with a `code` property containing
a machine-readable string code describing the error, for example
INVALID_TOKEN or USER_NOT_FOUND.

Also improve 404 error messages to include the model name.
2015-01-21 19:04:47 +01:00
Rob Halff 36e1f6840c fix jscs errors 2014-11-21 03:35:36 +01:00
Rob Halff a722f8c4cf 'done' is not defined 2014-11-21 02:52:11 +01:00
Miroslav Bajtoš 4fdcbd16af rest middleware: clean up context config
Modify `loopback.rest()` to read the configuration for
`loopback.context` from `app.get('remoting')`, which is the approach
used for all other configuration options related to the REST transport.
2014-11-05 09:13:45 +01:00
Raymond Feng 885f4e047d Enable the context middleware from loopback.rest 2014-11-05 09:13:45 +01:00
Raymond Feng 246f38c05d Add context propagation middleware
- Implement the middleware `loopback.context`
 - Inject context into juggler and strong-remoting
 - Make http context optional and default to false
 - Optionally mount context middleware from `loopback.rest`
2014-11-05 09:13:44 +01:00
Miroslav Bajtoš ead9d706e6 Add test for `remoting.rest.supportedTypes` 2014-10-31 10:39:13 +01:00
Miroslav Bajtoš 292c7ad497 Revert "rest handler options" 2014-10-31 10:06:57 +01:00
Guilherme Cirne ba6bf3f41b REST handler options. 2014-10-30 16:58:30 -02:00
Raymond Feng e0ed755ed3 Make sure GET /:id/exists returns 200 {exists: true|false}
https://github.com/strongloop/loopback/issues/679
2014-10-22 14:39:39 -07:00
Raymond Feng ad43d03ebb Expose Model.exists over HTTP HEAD 2014-07-30 21:57:45 -07:00
Miroslav Bajtoš bfb154d445 Modify `loopback.rest` to include `loopback.token`
Make `loopback.rest` self-contained, so that authentication works
out of the box.

    var app = loopback();
    app.enableAuth();
    app.use(loopback.rest());

Note that cookie parsing middleware is not added, users have to
explicitly configure that if they want to store access tokens
in cookies.

Modify `loopback.token` to skip token lookup when the request already
contains `accessToken` property. This is in line with other
connect-based middleware like `cookieParser` or `json`.
2014-05-21 15:22:36 +02:00