1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-06-21 00:45:18 +00:00

Can create movie posts

This commit is contained in:
2020-07-08 14:01:40 +02:00
parent 45c70cb40e
commit aafd4c5e7c
4 changed files with 30 additions and 1 deletions

View File

@ -141,6 +141,7 @@ pub fn create_post(r: &mut HttpRequestHandler) -> RequestResult {
PostKind::POST_KIND_IMAGE(PostFile::new_from_created_file(&path)?)
}
// YouTube posts
"youtube" => {
let youtube = r.post_string("youtube_id")?;
@ -151,6 +152,13 @@ pub fn create_post(r: &mut HttpRequestHandler) -> RequestResult {
PostKind::POST_KIND_YOUTUBE(youtube)
}
// Movies posts
"movie" => {
let movie_id = r.post_movie_id("movieID")?;
PostKind::POST_KIND_MOVIE(movie_id)
}
// TODO : add support for next types
_ => {