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