Adds liniting into the workflow (#3082)
* initial linting of src * fix indent to 2 spaces * Removes unnecessary rules * ignore spec folder for now * Spec linting * Fix spec indent * nits * nits * no no-empty rule
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
|
||||
import ClassesRouter from './ClassesRouter';
|
||||
import PromiseRouter from '../PromiseRouter';
|
||||
import Parse from 'parse/node';
|
||||
import rest from '../rest';
|
||||
import Auth from '../Auth';
|
||||
import RestWrite from '../RestWrite';
|
||||
@@ -75,14 +75,14 @@ export class SessionsRouter extends ClassesRouter {
|
||||
expiresAt: Parse._encode(expiresAt)
|
||||
};
|
||||
const create = new RestWrite(config, masterAuth, '_Session', null, sessionData);
|
||||
return create.execute().then(() => {
|
||||
return create.execute().then(() => {
|
||||
// delete the session token, use the db to skip beforeSave
|
||||
return config.database.update('_User', {
|
||||
objectId: user.id
|
||||
}, {
|
||||
sessionToken: {__op: 'Delete'}
|
||||
});
|
||||
}).then((res) => {
|
||||
}).then(() => {
|
||||
return Promise.resolve({ response: sessionData });
|
||||
});
|
||||
}
|
||||
@@ -94,7 +94,7 @@ export class SessionsRouter extends ClassesRouter {
|
||||
this.route('POST', '/sessions', req => { return this.handleCreate(req); });
|
||||
this.route('PUT', '/sessions/:objectId', req => { return this.handleUpdate(req); });
|
||||
this.route('DELETE', '/sessions/:objectId', req => { return this.handleDelete(req); });
|
||||
this.route('POST', '/upgradeToRevocableSession', req => { return this.handleUpdateToRevocableSession(req); })
|
||||
this.route('POST', '/upgradeToRevocableSession', req => { return this.handleUpdateToRevocableSession(req); })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user