aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-09-13 10:22:14 +0200
committerChocobozzz <me@florianbigard.com>2018-09-13 10:22:14 +0200
commit176e2114533e60dfc20dc4733ce57016e77b9eba (patch)
treeb774cd89e00992c22117944b699fa8a843c77dea /server
parent64eb80645182d55d0011b8bf1b1df2705f11766b (diff)
downloadPeerTube-176e2114533e60dfc20dc4733ce57016e77b9eba.tar.gz
PeerTube-176e2114533e60dfc20dc4733ce57016e77b9eba.tar.zst
PeerTube-176e2114533e60dfc20dc4733ce57016e77b9eba.zip
Retry transactions on user endpoints if needed
Diffstat (limited to 'server')
-rw-r--r--server/controllers/api/users/me.ts8
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'
5import { CONFIG, IMAGE_MIMETYPE_EXT, sequelizeTypescript } from '../../../initializers' 5import { CONFIG, IMAGE_MIMETYPE_EXT, sequelizeTypescript } from '../../../initializers'
6import { sendUpdateActor } from '../../../lib/activitypub/send' 6import { sendUpdateActor } from '../../../lib/activitypub/send'
7import { 7import {
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',
86meRouter.put('/me', 86meRouter.put('/me',
87 authenticate, 87 authenticate,
88 usersUpdateMeValidator, 88 usersUpdateMeValidator,
89 asyncMiddleware(updateMe) 89 asyncRetryTransactionMiddleware(updateMe)
90) 90)
91 91
92meRouter.post('/me/avatar/pick', 92meRouter.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',
138meRouter.delete('/me/subscriptions/:uri', 138meRouter.delete('/me/subscriptions/:uri',
139 authenticate, 139 authenticate,
140 userSubscriptionGetValidator, 140 userSubscriptionGetValidator,
141 asyncMiddleware(deleteUserSubscription) 141 asyncRetryTransactionMiddleware(deleteUserSubscription)
142) 142)
143 143
144// --------------------------------------------------------------------------- 144// ---------------------------------------------------------------------------