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

Create the conversation

This commit is contained in:
2020-06-04 13:36:57 +02:00
parent 8465f0da65
commit 435ba32653
7 changed files with 108 additions and 7 deletions

View File

@ -4,7 +4,7 @@
use crate::data::http_request_handler::HttpRequestHandler;
use crate::controllers::routes::RequestResult;
use crate::helpers::user_helper;
use crate::helpers::{user_helper, conversations_helper};
use crate::data::new_conversation::NewConversation;
/// Create a new conversation
@ -39,7 +39,10 @@ pub fn create(r: &mut HttpRequestHandler) -> RequestResult {
can_everyone_add_members: r.post_bool_opt("canEveryoneAddMembers", true)
};
println!("Conversation to create: {:#?}", conv);
// TODO : adapt for API
println!("Conversation to create: {:#?}", conv);
let conv_id = conversations_helper::create(&conv)?;
println!("conv: {}", conv_id);
r.success("create")
}