diff options
Diffstat (limited to 'server/middlewares/validators/user-subscriptions.ts')
-rw-r--r-- | server/middlewares/validators/user-subscriptions.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/middlewares/validators/user-subscriptions.ts b/server/middlewares/validators/user-subscriptions.ts index a54ecb704..0d0c8ccbf 100644 --- a/server/middlewares/validators/user-subscriptions.ts +++ b/server/middlewares/validators/user-subscriptions.ts | |||
@@ -6,6 +6,7 @@ import { ActorFollowModel } from '../../models/activitypub/actor-follow' | |||
6 | import { areValidActorHandles, isValidActorHandle } from '../../helpers/custom-validators/activitypub/actor' | 6 | import { areValidActorHandles, isValidActorHandle } from '../../helpers/custom-validators/activitypub/actor' |
7 | import { toArray } from '../../helpers/custom-validators/misc' | 7 | import { toArray } from '../../helpers/custom-validators/misc' |
8 | import { WEBSERVER } from '../../initializers/constants' | 8 | import { WEBSERVER } from '../../initializers/constants' |
9 | import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' | ||
9 | 10 | ||
10 | const userSubscriptionListValidator = [ | 11 | const userSubscriptionListValidator = [ |
11 | query('search').optional().not().isEmpty().withMessage('Should have a valid search'), | 12 | query('search').optional().not().isEmpty().withMessage('Should have a valid search'), |
@@ -61,7 +62,7 @@ const userSubscriptionGetValidator = [ | |||
61 | 62 | ||
62 | if (!subscription || !subscription.ActorFollowing.VideoChannel) { | 63 | if (!subscription || !subscription.ActorFollowing.VideoChannel) { |
63 | return res | 64 | return res |
64 | .status(404) | 65 | .status(HttpStatusCode.NOT_FOUND_404) |
65 | .json({ | 66 | .json({ |
66 | error: `Subscription ${req.params.uri} not found.` | 67 | error: `Subscription ${req.params.uri} not found.` |
67 | }) | 68 | }) |