Use Prettier JS (#5017)

* Adds prettier

* Run lint before tests
This commit is contained in:
Florent Vilmart
2018-09-01 13:58:06 -04:00
committed by GitHub
parent 189cd259ee
commit d83a0b6808
240 changed files with 41098 additions and 29020 deletions

View File

@@ -9,21 +9,41 @@ export class InstallationsRouter extends ClassesRouter {
}
handleFind(req) {
const body = Object.assign(req.body, ClassesRouter.JSONFromQuery(req.query));
const body = Object.assign(
req.body,
ClassesRouter.JSONFromQuery(req.query)
);
const options = ClassesRouter.optionsFromBody(body);
return rest.find(req.config, req.auth,
'_Installation', body.where, options, req.info.clientSDK)
.then((response) => {
return {response: response};
return rest
.find(
req.config,
req.auth,
'_Installation',
body.where,
options,
req.info.clientSDK
)
.then(response => {
return { response: response };
});
}
mountRoutes() {
this.route('GET','/installations', req => { return this.handleFind(req); });
this.route('GET','/installations/:objectId', req => { return this.handleGet(req); });
this.route('POST','/installations', req => { return this.handleCreate(req); });
this.route('PUT','/installations/:objectId', req => { return this.handleUpdate(req); });
this.route('DELETE','/installations/:objectId', req => { return this.handleDelete(req); });
this.route('GET', '/installations', req => {
return this.handleFind(req);
});
this.route('GET', '/installations/:objectId', req => {
return this.handleGet(req);
});
this.route('POST', '/installations', req => {
return this.handleCreate(req);
});
this.route('PUT', '/installations/:objectId', req => {
return this.handleUpdate(req);
});
this.route('DELETE', '/installations/:objectId', req => {
return this.handleDelete(req);
});
}
}