Add route /family/list

This commit is contained in:
2023-06-20 18:55:14 +02:00
parent 0ef722d29f
commit 3004f57185
5 changed files with 33 additions and 3 deletions

View File

@ -63,3 +63,8 @@ pub async fn join(
Ok(HttpResponse::Accepted().finish())
}
/// Get the list of families of the user
pub async fn list(token: LoginToken) -> HttpResult {
Ok(HttpResponse::Ok().json(families_service::get_user_memberships(token.user_id).await?))
}