|
|
|
@ -216,7 +216,7 @@ namespace IO.Swagger.Controllers |
|
|
|
|
/// <response code="500">Une erreur est survenue sur le serveur</response> |
|
|
|
|
[HttpGet] |
|
|
|
|
[Route("/api/formations/{idFormation}")] |
|
|
|
|
[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)] |
|
|
|
|
//[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)] |
|
|
|
|
[ValidateModelState] |
|
|
|
|
[SwaggerOperation("GetFormationById")] |
|
|
|
|
[SwaggerResponse(statusCode: 200, type: typeof(FormationDTO), description: "OK")] |
|
|
|
@ -229,7 +229,7 @@ namespace IO.Swagger.Controllers |
|
|
|
|
if (env.IsDevelopment()) |
|
|
|
|
logger.LogInformation("Récupération de la formation {idFormation}.", idFormation); |
|
|
|
|
|
|
|
|
|
FormationDTO formationDTO = null; |
|
|
|
|
FormationDTO formationDTO; |
|
|
|
|
|
|
|
|
|
try |
|
|
|
|
{ |
|
|
|
@ -298,7 +298,7 @@ namespace IO.Swagger.Controllers |
|
|
|
|
if (env.IsDevelopment()) |
|
|
|
|
logger.LogInformation("Récupération de la liste des formations."); |
|
|
|
|
|
|
|
|
|
IEnumerable<FormationDetailsDTO> formations = null; |
|
|
|
|
IEnumerable<FormationDetailsDTO> formations; |
|
|
|
|
|
|
|
|
|
try |
|
|
|
|
{ |
|
|
|
@ -342,7 +342,7 @@ namespace IO.Swagger.Controllers |
|
|
|
|
/// <response code="500">Une erreur est survenue sur le serveur</response> |
|
|
|
|
[HttpGet] |
|
|
|
|
[Route("/api/formations/count")] |
|
|
|
|
//[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)] |
|
|
|
|
[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)] |
|
|
|
|
[ValidateModelState] |
|
|
|
|
[SwaggerOperation("GetFormationsCount")] |
|
|
|
|
[SwaggerResponse(statusCode: 200, type: typeof(long?), description: "OK")] |
|
|
|
@ -354,7 +354,7 @@ namespace IO.Swagger.Controllers |
|
|
|
|
if (env.IsDevelopment()) |
|
|
|
|
logger.LogInformation("Récupération du nombre total de formations."); |
|
|
|
|
|
|
|
|
|
long count = 0; |
|
|
|
|
long count; |
|
|
|
|
|
|
|
|
|
try |
|
|
|
|
{ |
|
|
|
@ -402,7 +402,7 @@ namespace IO.Swagger.Controllers |
|
|
|
|
if (env.IsDevelopment()) |
|
|
|
|
logger.LogInformation("Récupération de la liste des modes de formation."); |
|
|
|
|
|
|
|
|
|
IEnumerable<ModeFormationDTO> modeFormations = null; |
|
|
|
|
IEnumerable<ModeFormationDTO> modeFormations; |
|
|
|
|
|
|
|
|
|
try |
|
|
|
|
{ |
|
|
|
@ -449,7 +449,7 @@ namespace IO.Swagger.Controllers |
|
|
|
|
if (env.IsDevelopment()) |
|
|
|
|
logger.LogInformation("Récupération de la liste des origines de formation."); |
|
|
|
|
|
|
|
|
|
IEnumerable<OrigineFormationDTO> origineFormations = null; |
|
|
|
|
IEnumerable<OrigineFormationDTO> origineFormations; |
|
|
|
|
|
|
|
|
|
try |
|
|
|
|
{ |
|
|
|
@ -496,7 +496,7 @@ namespace IO.Swagger.Controllers |
|
|
|
|
if (env.IsDevelopment()) |
|
|
|
|
logger.LogInformation("Récupération de la liste des statuts de formation."); |
|
|
|
|
|
|
|
|
|
IEnumerable<StatutFormationDTO> statutFormations = null; |
|
|
|
|
IEnumerable<StatutFormationDTO> statutFormations; |
|
|
|
|
|
|
|
|
|
try |
|
|
|
|
{ |
|
|
|
@ -543,7 +543,7 @@ namespace IO.Swagger.Controllers |
|
|
|
|
if (env.IsDevelopment()) |
|
|
|
|
logger.LogInformation("Récupération de la liste des types de formation."); |
|
|
|
|
|
|
|
|
|
IEnumerable<TypeFormationDTO> typeFormations = null; |
|
|
|
|
IEnumerable<TypeFormationDTO> typeFormations; |
|
|
|
|
|
|
|
|
|
try |
|
|
|
|
{ |
|
|
|
|