aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-07-11 17:04:57 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-07-11 17:05:55 +0200
commit075f16caac5236cb04c98ae7b3a989766d764bb3 (patch)
tree9a30024aa771735a28d83d9a166033b82dbcaf60 /server/lib
parent4e979c3e1b81f4762025d9db3052b1f70774b3bb (diff)
downloadPeerTube-075f16caac5236cb04c98ae7b3a989766d764bb3.tar.gz
PeerTube-075f16caac5236cb04c98ae7b3a989766d764bb3.tar.zst
PeerTube-075f16caac5236cb04c98ae7b3a989766d764bb3.zip
Remove "function" in favor of () => {}
Diffstat (limited to 'server/lib')
-rw-r--r--server/lib/friends.ts6
-rw-r--r--server/lib/oauth-model.ts4
2 files changed, 5 insertions, 5 deletions
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?:
111function quickAndDirtyUpdatesVideoToFriends (qadusParams: QaduParam[], transaction: Sequelize.Transaction) { 111function quickAndDirtyUpdatesVideoToFriends (qadusParams: QaduParam[], transaction: Sequelize.Transaction) {
112 const tasks = [] 112 const tasks = []
113 113
114 qadusParams.forEach(function (qaduParams) { 114 qadusParams.forEach(qaduParams => {
115 tasks.push(quickAndDirtyUpdateVideoToFriends(qaduParams, transaction)) 115 tasks.push(quickAndDirtyUpdateVideoToFriends(qaduParams, transaction))
116 }) 116 })
117 117
@@ -130,7 +130,7 @@ function addEventToRemoteVideo (eventParam: EventParam, transaction?: Sequelize.
130function addEventsToRemoteVideo (eventsParams: EventParam[], transaction: Sequelize.Transaction) { 130function addEventsToRemoteVideo (eventsParams: EventParam[], transaction: Sequelize.Transaction) {
131 const tasks = [] 131 const tasks = []
132 132
133 eventsParams.forEach(function (eventParams) { 133 eventsParams.forEach(eventParams => {
134 tasks.push(addEventToRemoteVideo(eventParams, transaction)) 134 tasks.push(addEventToRemoteVideo(eventParams, transaction))
135 }) 135 })
136 136
@@ -307,7 +307,7 @@ function getForeignPodsList (host: string) {
307 return new Promise< ResultList<FormatedPod> >((res, rej) => { 307 return new Promise< ResultList<FormatedPod> >((res, rej) => {
308 const path = '/api/' + API_VERSION + '/pods' 308 const path = '/api/' + API_VERSION + '/pods'
309 309
310 request.get(REMOTE_SCHEME.HTTP + '://' + host + path, function (err, response, body) { 310 request.get(REMOTE_SCHEME.HTTP + '://' + host + path, (err, response, body) => {
311 if (err) return rej(err) 311 if (err) return rej(err)
312 312
313 try { 313 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) {
27function getUser (username: string, password: string) { 27function getUser (username: string, password: string) {
28 logger.debug('Getting User (username: ' + username + ', password: ' + password + ').') 28 logger.debug('Getting User (username: ' + username + ', password: ' + password + ').')
29 29
30 return db.User.getByUsername(username).then(function (user) { 30 return db.User.getByUsername(username).then(user => {
31 if (!user) return null 31 if (!user) return null
32 32
33 return user.isPasswordMatch(password).then(passwordMatch => { 33 return user.isPasswordMatch(password).then(passwordMatch => {
@@ -39,7 +39,7 @@ function getUser (username: string, password: string) {
39} 39}
40 40
41function revokeToken (token: TokenInfo) { 41function revokeToken (token: TokenInfo) {
42 return db.OAuthToken.getByRefreshTokenAndPopulateUser(token.refreshToken).then(function (tokenDB) { 42 return db.OAuthToken.getByRefreshTokenAndPopulateUser(token.refreshToken).then(tokenDB => {
43 if (tokenDB) tokenDB.destroy() 43 if (tokenDB) tokenDB.destroy()
44 44
45 /* 45 /*