Add /family/{id}/users route
This commit is contained in:
@ -78,3 +78,8 @@ pub async fn single_info(f: FamilyInPath) -> HttpResult {
|
||||
Ok(HttpResponse::Ok()
|
||||
.json(families_service::get_family_membership(f.family_id(), f.user_id()).await?))
|
||||
}
|
||||
|
||||
/// Get the list of users who belongs to a family
|
||||
pub async fn users(f: FamilyInPath) -> HttpResult {
|
||||
Ok(HttpResponse::Ok().json(families_service::get_memberships_of_family(f.family_id()).await?))
|
||||
}
|
||||
|
Reference in New Issue
Block a user