Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omar backend #37

Merged
merged 5 commits into from
Feb 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*.txt
.env
.env
mappa_data/
2 changes: 1 addition & 1 deletion backend/Dtos/OrdinaryPersonDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public class OrdinaryPersonUpdateRequest

public class OrdinaryPersonFilterDto
{
public string Name {get; set;}
public string? Name {get; set;}
public int? Religion {get; set;}
public int? Ethnicity {get; set;}
public int? Profession {get; set;}
Expand Down
8 changes: 4 additions & 4 deletions backend/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@
var app = builder.Build();

// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
// if (app.Environment.IsDevelopment())
// {
IdentityModelEventSource.ShowPII = true;
IdentityModelEventSource.LogCompleteSecurityArtifact = true;
app.UseSwagger();
Expand All @@ -156,7 +156,7 @@
c.SwaggerEndpoint("/swagger/v1/swagger.json", "Mappa Anatolicorum API v1"); // Path to the Swagger JSON
c.RoutePrefix = string.Empty; // Set the Swagger UI at the root URL (optional)
});
}
// }

using (var scope = app.Services.CreateScope())
{
Expand All @@ -172,7 +172,7 @@


// In Configure method
//app.UseCors("AllowAll");
app.UseCors("AllowAll");

// 8. Authentication
app.UseAuthentication();
Expand Down
4 changes: 0 additions & 4 deletions backend/Services/OrdinaryPersonService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -572,10 +572,6 @@ public async Task<PaginationResponse<OrdinaryPersonFilterResponseDto>> GetPageAs
};
}
}
else
{
throw new ArgumentException("Filter is not provided.");
}

int totalCount = await query.CountAsync();

Expand Down
11 changes: 10 additions & 1 deletion backend/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,14 @@
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
"ConnectionStrings": {
"db": "Host=172.26.224.219;Port=5433; Database=MappaDB; Username=postgres; Password=pekHafi456."
},
"AllowedHosts": "*",
"JWT": {
"ValidAudience": "http://172.26.224.219:8080",
"ValidIssuer": "http://172.26.224.219:5433",
"Secret": "JWTAuthenticationHIGHsecuredPasswordVVVp1OH7Xzyr",
"TokenExpirationInHours": 3
}
}