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:
@ -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
|
||||
|
||||
_ => {
|
||||
|
Reference in New Issue
Block a user