|
|
@ -41,7 +41,7 @@ namespace espacecollab.backend.api.Controllers |
|
|
|
return Ok(addedCollaborateur); |
|
|
|
return Ok(addedCollaborateur); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[HttpDelete("delete/{collaborateurId:int:min(1)}")] |
|
|
|
[HttpDelete("{collaborateurId:int:min(1)}")] |
|
|
|
public ActionResult DeleteCollaborateur(int collaborateurId) |
|
|
|
public ActionResult DeleteCollaborateur(int collaborateurId) |
|
|
|
{ |
|
|
|
{ |
|
|
|
bool isCollaborateurDeleted = CollaborateursServices.Delete(collaborateurId); |
|
|
|
bool isCollaborateurDeleted = CollaborateursServices.Delete(collaborateurId); |
|
|
@ -64,10 +64,10 @@ namespace espacecollab.backend.api.Controllers |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[HttpGet("businessunit/{businessId:int:min(1)}")] |
|
|
|
[HttpGet("businessunit/{businessUnitId:int:min(1)}")] |
|
|
|
public ActionResult<IEnumerable<CollaborateurApiDto>> GetCollaborateursByBusinessUnit(int businessId) |
|
|
|
public ActionResult<IEnumerable<CollaborateurApiDto>> GetCollaborateursByBusinessUnit(int businessUnitId) |
|
|
|
{ |
|
|
|
{ |
|
|
|
IEnumerable<CollaborateurApiDto> collaborateurs = CollaborateursServices.GetCollaborateursByBusinessUnit(businessId); |
|
|
|
IEnumerable<CollaborateurApiDto> collaborateurs = CollaborateursServices.GetCollaborateursByBusinessUnit(businessUnitId); |
|
|
|
if (collaborateurs == null) |
|
|
|
if (collaborateurs == null) |
|
|
|
return NotFound(); |
|
|
|
return NotFound(); |
|
|
|
|
|
|
|
|
|
|
|