1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-06-20 16:35:17 +00:00

Can create weblink posts

This commit is contained in:
2020-07-08 14:08:54 +02:00
parent aafd4c5e7c
commit 82b1f5e473
2 changed files with 25 additions and 3 deletions

View File

@ -95,10 +95,17 @@ pub fn create(p: &Post) -> ResultBoxError<u64> {
insert_query = insert_query.add_u64("idvideo", *id);
}
// Weblink
POST_KIND_WEBLINK(weblink) => {
insert_query = insert_query
.add_str("url_page", &weblink.url)
.add_opt_str("titre_page", weblink.title.as_ref())
.add_opt_str("description_page", weblink.description.as_ref())
.add_opt_str("image_page", weblink.image.as_ref());
}
_ => unimplemented!()
/*
POST_KIND_WEBLINK(_) => {},
POST_KIND_MOVIE(_) => {},
POST_KIND_COUNTDOWN(_) => {},
POST_KIND_SURVEY => {},
*/