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

Add countdown timer posts support

This commit is contained in:
2020-07-03 17:13:02 +02:00
parent d632d0b888
commit 1e956cdcb5
3 changed files with 16 additions and 5 deletions

View File

@ -37,6 +37,9 @@ pub struct PostAPI {
// Movie specific
video_id: Option<u64>,
video_info: Option<MovieAPI>,
// Countdown timer specific
time_end: Option<u64>,
}
impl PostAPI {
@ -67,6 +70,9 @@ impl PostAPI {
// Movie specific
video_id: None,
video_info: None,
// Countdown timer-specific
time_end: None,
};
match &p.kind {
@ -91,7 +97,8 @@ impl PostAPI {
post.video_info = Some(MovieAPI::new(&movies_helper::get_info(*movie_id)?))
}
PostKind::POST_KIND_COUNTDOWN => {}
PostKind::POST_KIND_COUNTDOWN(time_end) => post.time_end = Some(*time_end),
PostKind::POST_KIND_SURVEY => {}
PostKind::POST_KIND_YOUTUBE => {}
}