aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-06-15 09:17:19 +0200
committerChocobozzz <me@florianbigard.com>2021-06-15 10:40:06 +0200
commiteae0365b5c5468e51e9795b0e894815ebda86b4a (patch)
tree5da54b28c94d43d1715a0c69e35eb1cf3a1a959d /server/controllers
parent51f636ad0f928bb94069c9143e38df0518f6e4a7 (diff)
downloadPeerTube-eae0365b5c5468e51e9795b0e894815ebda86b4a.tar.gz
PeerTube-eae0365b5c5468e51e9795b0e894815ebda86b4a.tar.zst
PeerTube-eae0365b5c5468e51e9795b0e894815ebda86b4a.zip
Fix missing transactions
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/api/server/follows.ts2
-rw-r--r--server/controllers/api/videos/ownership.ts4
2 files changed, 3 insertions, 3 deletions
diff --git a/server/controllers/api/server/follows.ts b/server/controllers/api/server/follows.ts
index daeef22de..12357a2ca 100644
--- a/server/controllers/api/server/follows.ts
+++ b/server/controllers/api/server/follows.ts
@@ -176,7 +176,7 @@ async function removeOrRejectFollower (req: express.Request, res: express.Respon
176async function acceptFollower (req: express.Request, res: express.Response) { 176async function acceptFollower (req: express.Request, res: express.Response) {
177 const follow = res.locals.follow 177 const follow = res.locals.follow
178 178
179 await sendAccept(follow) 179 sendAccept(follow)
180 180
181 follow.state = 'accepted' 181 follow.state = 'accepted'
182 await follow.save() 182 await follow.save()
diff --git a/server/controllers/api/videos/ownership.ts b/server/controllers/api/videos/ownership.ts
index 2d6ca60a8..1bb96e046 100644
--- a/server/controllers/api/videos/ownership.ts
+++ b/server/controllers/api/videos/ownership.ts
@@ -105,9 +105,9 @@ function acceptOwnership (req: express.Request, res: express.Response) {
105 const channel = res.locals.videoChannel 105 const channel = res.locals.videoChannel
106 106
107 // We need more attributes for federation 107 // We need more attributes for federation
108 const targetVideo = await VideoModel.loadAndPopulateAccountAndServerAndTags(videoChangeOwnership.Video.id) 108 const targetVideo = await VideoModel.loadAndPopulateAccountAndServerAndTags(videoChangeOwnership.Video.id, t)
109 109
110 const oldVideoChannel = await VideoChannelModel.loadAndPopulateAccount(targetVideo.channelId) 110 const oldVideoChannel = await VideoChannelModel.loadAndPopulateAccount(targetVideo.channelId, t)
111 111
112 targetVideo.channelId = channel.id 112 targetVideo.channelId = channel.id
113 113