mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-06-21 08:55:16 +00:00
Add countdown timer posts support
This commit is contained in:
@ -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_IMAGE, POST_KIND_MOVIE, POST_KIND_PDF, POST_KIND_WEBLINK};
|
||||
use crate::data::post::PostKind::{POST_KIND_COUNTDOWN, POST_KIND_IMAGE, POST_KIND_MOVIE, POST_KIND_PDF, POST_KIND_WEBLINK};
|
||||
use crate::data::user::UserID;
|
||||
use crate::helpers::{database, friends_helper};
|
||||
use crate::utils::date_utils::time;
|
||||
@ -172,6 +172,8 @@ fn db_to_post(res: &database::RowResult) -> ResultBoxError<Post> {
|
||||
|
||||
"video" => post.kind = POST_KIND_MOVIE(res.get_u64("idvideo")?),
|
||||
|
||||
"count_down" => post.kind = POST_KIND_COUNTDOWN(res.get_u64("time_end").unwrap_or(0)),
|
||||
|
||||
_ => {}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user