Retry transactions on user endpoints if needed

pull/1082/merge
Chocobozzz 2018-09-13 10:22:14 +02:00
parent 64eb806451
commit 176e211453
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 4 additions and 4 deletions

View File

@ -5,7 +5,7 @@ import { getFormattedObjects } from '../../../helpers/utils'
import { CONFIG, IMAGE_MIMETYPE_EXT, sequelizeTypescript } from '../../../initializers'
import { sendUpdateActor } from '../../../lib/activitypub/send'
import {
asyncMiddleware,
asyncMiddleware, asyncRetryTransactionMiddleware,
authenticate,
commonVideosFiltersValidator,
paginationValidator,
@ -86,14 +86,14 @@ meRouter.get('/me/videos/:videoId/rating',
meRouter.put('/me',
authenticate,
usersUpdateMeValidator,
asyncMiddleware(updateMe)
asyncRetryTransactionMiddleware(updateMe)
)
meRouter.post('/me/avatar/pick',
authenticate,
reqAvatarFile,
updateAvatarValidator,
asyncMiddleware(updateMyAvatar)
asyncRetryTransactionMiddleware(updateMyAvatar)
)
// ##### Subscriptions part #####
@ -138,7 +138,7 @@ meRouter.get('/me/subscriptions/:uri',
meRouter.delete('/me/subscriptions/:uri',
authenticate,
userSubscriptionGetValidator,
asyncMiddleware(deleteUserSubscription)
asyncRetryTransactionMiddleware(deleteUserSubscription)
)
// ---------------------------------------------------------------------------