diff --git a/EPAServeur/Controllers/FormationsApi.cs b/EPAServeur/Controllers/FormationsApi.cs index 52e9203..b641701 100644 --- a/EPAServeur/Controllers/FormationsApi.cs +++ b/EPAServeur/Controllers/FormationsApi.cs @@ -216,7 +216,7 @@ namespace IO.Swagger.Controllers /// Une erreur est survenue sur le serveur [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 formations = null; + IEnumerable formations; try { @@ -342,7 +342,7 @@ namespace IO.Swagger.Controllers /// Une erreur est survenue sur le serveur [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 modeFormations = null; + IEnumerable 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 origineFormations = null; + IEnumerable 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 statutFormations = null; + IEnumerable 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 typeFormations = null; + IEnumerable typeFormations; try {