mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Remove "function" in favor of () => {}
This commit is contained in:
@@ -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<FormatedPod> >((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 {
|
||||
|
||||
@@ -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()
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user