diff options
Diffstat (limited to 'server/controllers/api/users/my-subscriptions.ts')
-rw-r--r-- | server/controllers/api/users/my-subscriptions.ts | 7 |
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 { | |||
27 | import { ActorFollowModel } from '../../../models/activitypub/actor-follow' | 27 | import { ActorFollowModel } from '../../../models/activitypub/actor-follow' |
28 | import { VideoModel } from '../../../models/video/video' | 28 | import { VideoModel } from '../../../models/video/video' |
29 | import { sendUndoFollow } from '@server/lib/activitypub/send' | 29 | import { sendUndoFollow } from '@server/lib/activitypub/send' |
30 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' | ||
30 | 31 | ||
31 | const mySubscriptionsRouter = express.Router() | 32 | const 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 | ||
132 | function getUserSubscription (req: express.Request, res: express.Response) { | 133 | function 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 | ||
150 | async function getUserSubscriptions (req: express.Request, res: express.Response) { | 153 | async function getUserSubscriptions (req: express.Request, res: express.Response) { |