diff options
author | Chocobozzz <me@florianbigard.com> | 2018-09-13 10:22:14 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-09-13 10:22:14 +0200 |
commit | 176e2114533e60dfc20dc4733ce57016e77b9eba (patch) | |
tree | b774cd89e00992c22117944b699fa8a843c77dea /server/controllers | |
parent | 64eb80645182d55d0011b8bf1b1df2705f11766b (diff) | |
download | PeerTube-176e2114533e60dfc20dc4733ce57016e77b9eba.tar.gz PeerTube-176e2114533e60dfc20dc4733ce57016e77b9eba.tar.zst PeerTube-176e2114533e60dfc20dc4733ce57016e77b9eba.zip |
Retry transactions on user endpoints if needed
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/api/users/me.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/controllers/api/users/me.ts b/server/controllers/api/users/me.ts index 0f18b42f9..e886d4b2a 100644 --- a/server/controllers/api/users/me.ts +++ b/server/controllers/api/users/me.ts | |||
@@ -5,7 +5,7 @@ import { getFormattedObjects } from '../../../helpers/utils' | |||
5 | import { CONFIG, IMAGE_MIMETYPE_EXT, sequelizeTypescript } from '../../../initializers' | 5 | import { CONFIG, IMAGE_MIMETYPE_EXT, sequelizeTypescript } from '../../../initializers' |
6 | import { sendUpdateActor } from '../../../lib/activitypub/send' | 6 | import { sendUpdateActor } from '../../../lib/activitypub/send' |
7 | import { | 7 | import { |
8 | asyncMiddleware, | 8 | asyncMiddleware, asyncRetryTransactionMiddleware, |
9 | authenticate, | 9 | authenticate, |
10 | commonVideosFiltersValidator, | 10 | commonVideosFiltersValidator, |
11 | paginationValidator, | 11 | paginationValidator, |
@@ -86,14 +86,14 @@ meRouter.get('/me/videos/:videoId/rating', | |||
86 | meRouter.put('/me', | 86 | meRouter.put('/me', |
87 | authenticate, | 87 | authenticate, |
88 | usersUpdateMeValidator, | 88 | usersUpdateMeValidator, |
89 | asyncMiddleware(updateMe) | 89 | asyncRetryTransactionMiddleware(updateMe) |
90 | ) | 90 | ) |
91 | 91 | ||
92 | meRouter.post('/me/avatar/pick', | 92 | meRouter.post('/me/avatar/pick', |
93 | authenticate, | 93 | authenticate, |
94 | reqAvatarFile, | 94 | reqAvatarFile, |
95 | updateAvatarValidator, | 95 | updateAvatarValidator, |
96 | asyncMiddleware(updateMyAvatar) | 96 | asyncRetryTransactionMiddleware(updateMyAvatar) |
97 | ) | 97 | ) |
98 | 98 | ||
99 | // ##### Subscriptions part ##### | 99 | // ##### Subscriptions part ##### |
@@ -138,7 +138,7 @@ meRouter.get('/me/subscriptions/:uri', | |||
138 | meRouter.delete('/me/subscriptions/:uri', | 138 | meRouter.delete('/me/subscriptions/:uri', |
139 | authenticate, | 139 | authenticate, |
140 | userSubscriptionGetValidator, | 140 | userSubscriptionGetValidator, |
141 | asyncMiddleware(deleteUserSubscription) | 141 | asyncRetryTransactionMiddleware(deleteUserSubscription) |
142 | ) | 142 | ) |
143 | 143 | ||
144 | // --------------------------------------------------------------------------- | 144 | // --------------------------------------------------------------------------- |