1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2025-06-23 18:11:40 +00:00

Create postMovieID method

This commit is contained in:
2020-04-18 11:44:27 +02:00
parent 3058069a7d
commit e06cb1b28c
2 changed files with 16 additions and 4 deletions

View File

@ -213,10 +213,7 @@ export class PostsController {
// Personnal movies posts
case PostKind.POST_KIND_MOVIE:
const movieID = h.postInt("movieID");
if(!await MoviesHelper.DoesUserHas(h.getUserId(), movieID))
h.error(401, "You are not authorized to use this movie!");
const movieID = await h.postMovieID("movieID");
newPost.movieID = movieID;