From d6b7d5cc109c4f2cb1ef7599f6c3cf09bf69f88a Mon Sep 17 00:00:00 2001 From: Leni BEAULATON Date: Thu, 3 Apr 2025 17:07:03 +0200 Subject: [PATCH] Bdd10 SQLite --- WF_EF_Api/StubbedContextLib/StubWTFContext.cs | 2 +- WF_EF_Api/WfApi/Controllers/UsersController.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WF_EF_Api/StubbedContextLib/StubWTFContext.cs b/WF_EF_Api/StubbedContextLib/StubWTFContext.cs index 7491486..10461ea 100644 --- a/WF_EF_Api/StubbedContextLib/StubWTFContext.cs +++ b/WF_EF_Api/StubbedContextLib/StubWTFContext.cs @@ -144,7 +144,7 @@ namespace StubbedContextLib if (!options.IsConfigured) { options.UseSqlite( - $"Data Source=WhatTheFantasy-wtf-api-auth;"); + $"Data Source={Environment.GetEnvironmentVariable("DB_PATH_AUTH")};"); //options.UseSqlServer(@"Server=(localdb)\mssqllocaldb;Database=Wf-Database.mdf;Trusted_Connection=True;"); diff --git a/WF_EF_Api/WfApi/Controllers/UsersController.cs b/WF_EF_Api/WfApi/Controllers/UsersController.cs index 803d609..be13e1f 100644 --- a/WF_EF_Api/WfApi/Controllers/UsersController.cs +++ b/WF_EF_Api/WfApi/Controllers/UsersController.cs @@ -66,7 +66,7 @@ namespace WfApi.Controllers } catch (Exception e) { - return StatusCode((int)HttpStatusCode.InternalServerError, new { message = "Internal Server Error" +e.Message }); + return StatusCode((int)HttpStatusCode.InternalServerError, new { message = "Internal Server Error" +e.Message + " --- " + Environment.GetEnvironmentVariable("DB_PATH_AUTH")}); } }