Get linting passing again

This commit is contained in:
Jonathan Cremin 2016-06-06 15:37:00 +01:00
parent 4f95f27400
commit 494f66d388
21 changed files with 367 additions and 212 deletions

View file

@ -11,25 +11,25 @@ const connection = new Promise((resolve, reject) => {
client.on('error', reject);
resolve(client);
}).catch((err) => {
debug('Connection error: ' + err);
debug('Connection error: ', err);
throw err;
});
const redisSession = new Promise((resolve, reject) => {
return connection.then((client) => {
const sessionClient = koaRedis({client: client});
const redisSession = new Promise((resolve, reject) =>
connection.then((client) => {
const sessionClient = koaRedis({ client });
resolve(session({
key: 'hid',
store: sessionClient,
}));
}).catch((err) => {
debug('koa-redis error: ' + err);
debug('koa-redis error: ', err);
reject(err);
});
});
})
);
const wrapped = new Promise((resolve, reject) => {
return connection.then((client) => {
const wrapped = new Promise((resolve, reject) =>
connection.then((client) => {
const asyncClient = coRedis(client);
asyncClient.on('error', reject);
asyncClient.on('ready', () => {
@ -37,11 +37,11 @@ const wrapped = new Promise((resolve, reject) => {
resolve(asyncClient);
});
}).catch((err) => {
debug('co-redis error: ' + err);
debug('co-redis error: ', err);
reject(err);
throw err;
});
});
})
);
export function sessionStore() {
return function* sessionStoreMiddleware(next) {