1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-09-25 22:29:45 +00:00

Ready to implement new route

This commit is contained in:
2020-06-12 08:50:09 +02:00
parent 620328b33b
commit bfd7cc0630
2 changed files with 8 additions and 1 deletions

View File

@@ -48,8 +48,12 @@ pub fn create(r: &mut HttpRequestHandler) -> RequestResult {
/// Get the list of conversations of a user
pub fn get_list(r: &mut HttpRequestHandler) -> RequestResult {
let list = conversations_helper::get_list_user(r.user_id()?)?;
r.set_response(list.iter().map(|c| ConversationAPI::new(c)).collect::<Vec<ConversationAPI>>())
}
/// Get information about a single conversation
pub fn get_single(r: &mut HttpRequestHandler) -> RequestResult {
r.success("Implement id")
}