aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers')
-rw-r--r--server/helpers/custom-validators/video-ownership.ts3
-rw-r--r--server/helpers/middlewares/video-abuses.ts3
2 files changed, 4 insertions, 2 deletions
diff --git a/server/helpers/custom-validators/video-ownership.ts b/server/helpers/custom-validators/video-ownership.ts
index 9570b2799..2d1849332 100644
--- a/server/helpers/custom-validators/video-ownership.ts
+++ b/server/helpers/custom-validators/video-ownership.ts
@@ -3,7 +3,8 @@ import { VideoChangeOwnershipModel } from '../../models/video/video-change-owner
3import { MVideoChangeOwnershipFull } from '@server/typings/models/video/video-change-ownership' 3import { MVideoChangeOwnershipFull } from '@server/typings/models/video/video-change-ownership'
4import { MUserId } from '@server/typings/models' 4import { MUserId } from '@server/typings/models'
5 5
6export async function doesChangeVideoOwnershipExist (id: number, res: Response) { 6export async function doesChangeVideoOwnershipExist (idArg: number | string, res: Response) {
7 const id = parseInt(idArg + '', 10)
7 const videoChangeOwnership = await VideoChangeOwnershipModel.load(id) 8 const videoChangeOwnership = await VideoChangeOwnershipModel.load(id)
8 9
9 if (!videoChangeOwnership) { 10 if (!videoChangeOwnership) {
diff --git a/server/helpers/middlewares/video-abuses.ts b/server/helpers/middlewares/video-abuses.ts
index 1b573ca37..8a1d3d618 100644
--- a/server/helpers/middlewares/video-abuses.ts
+++ b/server/helpers/middlewares/video-abuses.ts
@@ -1,7 +1,8 @@
1import { Response } from 'express' 1import { Response } from 'express'
2import { VideoAbuseModel } from '../../models/video/video-abuse' 2import { VideoAbuseModel } from '../../models/video/video-abuse'
3 3
4async function doesVideoAbuseExist (abuseId: number, videoId: number, res: Response) { 4async function doesVideoAbuseExist (abuseIdArg: number | string, videoId: number, res: Response) {
5 const abuseId = parseInt(abuseIdArg + '', 10)
5 const videoAbuse = await VideoAbuseModel.loadByIdAndVideoId(abuseId, videoId) 6 const videoAbuse = await VideoAbuseModel.loadByIdAndVideoId(abuseId, videoId)
6 7
7 if (videoAbuse === null) { 8 if (videoAbuse === null) {