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