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

Add YouTube posts support

This commit is contained in:
2020-07-04 17:06:06 +02:00
parent 8d5013b00a
commit 532bd9e48d
3 changed files with 9 additions and 4 deletions

View File

@ -5,7 +5,7 @@
use crate::constants::database_tables_names::POSTS_TABLE;
use crate::data::error::{ExecError, ResultBoxError};
use crate::data::post::{Post, PostFile, PostKind, PostPageKind, PostVisibilityLevel, PostWebLink};
use crate::data::post::PostKind::{POST_KIND_COUNTDOWN, POST_KIND_IMAGE, POST_KIND_MOVIE, POST_KIND_PDF, POST_KIND_SURVEY, POST_KIND_WEBLINK};
use crate::data::post::PostKind::{POST_KIND_COUNTDOWN, POST_KIND_IMAGE, POST_KIND_MOVIE, POST_KIND_PDF, POST_KIND_SURVEY, POST_KIND_WEBLINK, POST_KIND_YOUTUBE};
use crate::data::user::UserID;
use crate::helpers::{database, friends_helper};
use crate::utils::date_utils::time;
@ -176,6 +176,8 @@ fn db_to_post(res: &database::RowResult) -> ResultBoxError<Post> {
"sondage" => post.kind = POST_KIND_SURVEY,
"youtube" => post.kind = POST_KIND_YOUTUBE(res.get_str("path")?),
_ => {}
}