feat: Option zur Verwendung von Swagger und Scalar in der Produktion hinzufügen.

- Login-Endpunkt beheben
This commit is contained in:
Developer 02 2025-04-09 09:53:13 +02:00
parent 9a4931781a
commit 3f33be452c
4 changed files with 16 additions and 5 deletions

View File

@ -0,0 +1,13 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "9.0.3",
"commands": [
"dotnet-ef"
],
"rollForward": false
}
}
}

View File

@ -63,10 +63,6 @@ namespace EnvelopeGenerator.GeneratorAPI.Controllers
{
try
{
return Ok();
throw new NotImplementedException("JWT and cookie option is not implemented");
bool isValid = _dirSearchService.ValidateCredentials(login.Username, login.Password);
if (!isValid)

View File

@ -89,7 +89,7 @@ var app = builder.Build();
app.MapOpenApi();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
if (app.Environment.IsDevelopment() || (app.IsDevOrDiP() && config.GetValue<bool>("UseSwagger")))
{
app.UseSwagger();
app.UseSwaggerUI();

View File

@ -1,4 +1,6 @@
{
"UseSwagger": true,
"DiPMode": true,
"Logging": {
"LogLevel": {
"Default": "Information",