X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fcontrollers%2Fapi%2Fusers%2Fmy-history.ts;h=e6d3e86ac42466939c53692c3130df62aee7a8e0;hb=4638cd713dcdd007cd7f49b9a95fa62ac7823e7c;hp=bc5b40f59ab3446fd1affa7699e312fa264d3ec8;hpb=6bcb559fc9a491fc3ce83e7c077ee9dc742b1d63;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/controllers/api/users/my-history.ts b/server/controllers/api/users/my-history.ts index bc5b40f59..e6d3e86ac 100644 --- a/server/controllers/api/users/my-history.ts +++ b/server/controllers/api/users/my-history.ts @@ -1,3 +1,4 @@ +import { forceNumber } from '@shared/core-utils' import express from 'express' import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' import { getFormattedObjects } from '../../../helpers/utils' @@ -55,7 +56,7 @@ async function listMyVideosHistory (req: express.Request, res: express.Response) async function removeUserHistoryElement (req: express.Request, res: express.Response) { const user = res.locals.oauth.token.User - await UserVideoHistoryModel.removeUserHistoryElement(user, parseInt(req.params.videoId + '')) + await UserVideoHistoryModel.removeUserHistoryElement(user, forceNumber(req.params.videoId)) return res.sendStatus(HttpStatusCode.NO_CONTENT_204) }