mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-06-21 00:45:18 +00:00
Can create YouTube posts
This commit is contained in:
@ -75,7 +75,7 @@ pub fn create(p: &Post) -> ResultBoxError<u64> {
|
||||
.add_opt_str("texte", p.content.as_ref());
|
||||
|
||||
match &p.kind {
|
||||
PostKind::POST_KIND_TEXT => {/* nothing to do */},
|
||||
PostKind::POST_KIND_TEXT => { /* nothing to do */ }
|
||||
|
||||
// Posts with associated file
|
||||
POST_KIND_IMAGE(file) | POST_KIND_PDF(file) => {
|
||||
@ -84,6 +84,11 @@ pub fn create(p: &Post) -> ResultBoxError<u64> {
|
||||
.add_opt_str("file_type", file.file_type.as_ref());
|
||||
}
|
||||
|
||||
// YouTube posts
|
||||
POST_KIND_YOUTUBE(id) => {
|
||||
insert_query = insert_query.add_str("path", id)
|
||||
.add_str("type", "youtube");
|
||||
}
|
||||
|
||||
_ => unimplemented!()
|
||||
/*
|
||||
@ -91,7 +96,7 @@ pub fn create(p: &Post) -> ResultBoxError<u64> {
|
||||
POST_KIND_MOVIE(_) => {},
|
||||
POST_KIND_COUNTDOWN(_) => {},
|
||||
POST_KIND_SURVEY => {},
|
||||
POST_KIND_YOUTUBE(_) => {},*/
|
||||
*/
|
||||
}
|
||||
|
||||
// Execute insertion
|
||||
|
Reference in New Issue
Block a user