aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/users/my-subscriptions.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/users/my-subscriptions.ts')
-rw-r--r--server/controllers/api/users/my-subscriptions.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/server/controllers/api/users/my-subscriptions.ts b/server/controllers/api/users/my-subscriptions.ts
index 66b33c477..ec77ddd7a 100644
--- a/server/controllers/api/users/my-subscriptions.ts
+++ b/server/controllers/api/users/my-subscriptions.ts
@@ -27,6 +27,7 @@ import {
27import { ActorFollowModel } from '../../../models/activitypub/actor-follow' 27import { ActorFollowModel } from '../../../models/activitypub/actor-follow'
28import { VideoModel } from '../../../models/video/video' 28import { VideoModel } from '../../../models/video/video'
29import { sendUndoFollow } from '@server/lib/activitypub/send' 29import { sendUndoFollow } from '@server/lib/activitypub/send'
30import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
30 31
31const mySubscriptionsRouter = express.Router() 32const mySubscriptionsRouter = express.Router()
32 33
@@ -126,7 +127,7 @@ function addUserSubscription (req: express.Request, res: express.Response) {
126 127
127 JobQueue.Instance.createJob({ type: 'activitypub-follow', payload }) 128 JobQueue.Instance.createJob({ type: 'activitypub-follow', payload })
128 129
129 return res.status(204).end() 130 return res.status(HttpStatusCode.NO_CONTENT_204).end()
130} 131}
131 132
132function getUserSubscription (req: express.Request, res: express.Response) { 133function getUserSubscription (req: express.Request, res: express.Response) {
@@ -144,7 +145,9 @@ async function deleteUserSubscription (req: express.Request, res: express.Respon
144 return subscription.destroy({ transaction: t }) 145 return subscription.destroy({ transaction: t })
145 }) 146 })
146 147
147 return res.type('json').status(204).end() 148 return res.type('json')
149 .status(HttpStatusCode.NO_CONTENT_204)
150 .end()
148} 151}
149 152
150async function getUserSubscriptions (req: express.Request, res: express.Response) { 153async function getUserSubscriptions (req: express.Request, res: express.Response) {