Add GET /family/{id}/member/{id_member}
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
use crate::constants::{SizeConstraint, StaticConstraints};
|
||||
use crate::controllers::HttpResult;
|
||||
use crate::extractors::family_extractor::FamilyInPath;
|
||||
use crate::extractors::member_extractor::FamilyAndMemberInPath;
|
||||
use crate::models::{Member, MemberID, Sex};
|
||||
use crate::services::members_service;
|
||||
use crate::utils::countries_utils;
|
||||
@ -240,3 +241,8 @@ pub async fn create(f: FamilyInPath, req: web::Json<MemberRequest>) -> HttpResul
|
||||
|
||||
Ok(HttpResponse::Ok().json(member))
|
||||
}
|
||||
|
||||
/// Get the information of a single family member
|
||||
pub async fn get_single(m: FamilyAndMemberInPath) -> HttpResult {
|
||||
Ok(HttpResponse::Ok().json(m.to_member()))
|
||||
}
|
||||
|
Reference in New Issue
Block a user