feat: skills endpoint, stylistic changes

This commit is contained in:
2025-06-01 02:15:20 +02:00
parent 4be57c27d9
commit 72fbfe982f
4 changed files with 39 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http;
using Microsoft.EntityFrameworkCore;
using WebApp.Data;
using WebApp.DTOs;
@@ -134,7 +134,7 @@ namespace WebApp.Endpoints
// Uzyskaj organizację z tokenu
Token? token = await guhf.GetTokenFromHTTPContext(httpContext);
Organisation? org = await guhf.GetOrganisationFromToken(token);
if (org is null) return Results.StatusCode(403);
if (org is null) return Results.Unauthorized();
// Sprawdź, czy organizacja ma prawo
// do usunięcia tego (EventId = id) eventu.
@@ -160,7 +160,6 @@ namespace WebApp.Endpoints
Organisation? org = await guhf.GetOrganisationFromToken(token);
List<EventSummaryDto> SearchResults = [];
List<Event> AllEvents = await dbContext.Events.ToListAsync();
if (sort is null || sort.ToUpper() != "ASC")