From 075f16caac5236cb04c98ae7b3a989766d764bb3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 11 Jul 2017 17:04:57 +0200 Subject: Remove "function" in favor of () => {} --- server/lib/friends.ts | 6 +++--- server/lib/oauth-model.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'server/lib') diff --git a/server/lib/friends.ts b/server/lib/friends.ts index cbdc60441..6ed0da013 100644 --- a/server/lib/friends.ts +++ b/server/lib/friends.ts @@ -111,7 +111,7 @@ function quickAndDirtyUpdateVideoToFriends (qaduParam: QaduParam, transaction?: function quickAndDirtyUpdatesVideoToFriends (qadusParams: QaduParam[], transaction: Sequelize.Transaction) { const tasks = [] - qadusParams.forEach(function (qaduParams) { + qadusParams.forEach(qaduParams => { tasks.push(quickAndDirtyUpdateVideoToFriends(qaduParams, transaction)) }) @@ -130,7 +130,7 @@ function addEventToRemoteVideo (eventParam: EventParam, transaction?: Sequelize. function addEventsToRemoteVideo (eventsParams: EventParam[], transaction: Sequelize.Transaction) { const tasks = [] - eventsParams.forEach(function (eventParams) { + eventsParams.forEach(eventParams => { tasks.push(addEventToRemoteVideo(eventParams, transaction)) }) @@ -307,7 +307,7 @@ function getForeignPodsList (host: string) { return new Promise< ResultList >((res, rej) => { const path = '/api/' + API_VERSION + '/pods' - request.get(REMOTE_SCHEME.HTTP + '://' + host + path, function (err, response, body) { + request.get(REMOTE_SCHEME.HTTP + '://' + host + path, (err, response, body) => { if (err) return rej(err) try { diff --git a/server/lib/oauth-model.ts b/server/lib/oauth-model.ts index 2d7e56756..769ea126a 100644 --- a/server/lib/oauth-model.ts +++ b/server/lib/oauth-model.ts @@ -27,7 +27,7 @@ function getRefreshToken (refreshToken: string) { function getUser (username: string, password: string) { logger.debug('Getting User (username: ' + username + ', password: ' + password + ').') - return db.User.getByUsername(username).then(function (user) { + return db.User.getByUsername(username).then(user => { if (!user) return null return user.isPasswordMatch(password).then(passwordMatch => { @@ -39,7 +39,7 @@ function getUser (username: string, password: string) { } function revokeToken (token: TokenInfo) { - return db.OAuthToken.getByRefreshTokenAndPopulateUser(token.refreshToken).then(function (tokenDB) { + return db.OAuthToken.getByRefreshTokenAndPopulateUser(token.refreshToken).then(tokenDB => { if (tokenDB) tokenDB.destroy() /* -- cgit v1.2.3