From 481be1475e628d58d71d6dccbb111dae6494c81a Mon Sep 17 00:00:00 2001 From: faiez_benamar <38057044+benamarfaiez@users.noreply.github.com> Date: Mon, 29 Dec 2025 20:19:49 +0100 Subject: [PATCH 1/2] =?UTF-8?q?validation=20de=20la=20cha=C3=AEne=20DbConn?= =?UTF-8?q?ection?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Backend/src/FlowTasks.API/Program.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Backend/src/FlowTasks.API/Program.cs b/Backend/src/FlowTasks.API/Program.cs index 634d2f4..cbb72a2 100644 --- a/Backend/src/FlowTasks.API/Program.cs +++ b/Backend/src/FlowTasks.API/Program.cs @@ -10,6 +10,7 @@ using Microsoft.IdentityModel.Tokens; using Microsoft.OpenApi.Models; using Serilog; +using System.Data.Common; using System.Text; var builder = WebApplication.CreateBuilder(args); @@ -61,10 +62,14 @@ }); }); -var dbConnectin = builder.Configuration["DbConnection"]; +var dbConnection = builder.Configuration["DbConnection"]; +if (string.IsNullOrWhiteSpace(dbConnection)) +{ + Log.Error("DbConnection est vide ou manquante dans la configuration !"); +} // Database configuration builder.Services.AddDbContext(options => - options.UseNpgsql(dbConnectin)); + options.UseNpgsql(dbConnection)); // Identity configuration builder.Services.AddIdentity(options => From fa5666c71d391b95f8ddca6a1ad9d4675e822fdd Mon Sep 17 00:00:00 2001 From: faiez_benamar <38057044+benamarfaiez@users.noreply.github.com> Date: Mon, 29 Dec 2025 20:23:16 +0100 Subject: [PATCH 2/2] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20la=20r=C3=A9cup?= =?UTF-8?q?=C3=A9ration=20de=20la=20cha=C3=AEne=20de=20connexion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Backend/src/FlowTasks.API/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Backend/src/FlowTasks.API/Program.cs b/Backend/src/FlowTasks.API/Program.cs index cbb72a2..f66bfe0 100644 --- a/Backend/src/FlowTasks.API/Program.cs +++ b/Backend/src/FlowTasks.API/Program.cs @@ -62,7 +62,7 @@ }); }); -var dbConnection = builder.Configuration["DbConnection"]; +var dbConnection = builder.Configuration.GetConnectionString("DefaultConnection"); if (string.IsNullOrWhiteSpace(dbConnection)) { Log.Error("DbConnection est vide ou manquante dans la configuration !");