Remove /api prefix from all routes and fix CityId FK constraint
- Strip /api prefix from all endpoint routes - Make Show.CityId nullable (no longer required FK) - Drop CityId FK constraint and alter column to NULL at startup via raw SQL - Add migration MakeCityIdNullable for schema consistency - Update Show DTOs to reflect nullable CityId Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,7 @@ public class CreateSoundEndpoint(PyroFetesDbContext pyroFetesDbContext) : Endpoi
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
Post("/api/sounds");
|
||||
Post("/sounds");
|
||||
AllowAnonymous();
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ public class DeleteSoundEndpoint(PyroFetesDbContext pyroFetesDbContext) : Endpoi
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
Delete("/api/sounds/{Id}");
|
||||
Delete("/sounds/{Id}");
|
||||
AllowAnonymous();
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ public class GetAllSoundsEndpoint(PyroFetesDbContext pyroFetesDbContext) : Endpo
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
Get("/api/sounds");
|
||||
Get("/sounds");
|
||||
AllowAnonymous();
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ public class GetSoundEndpoint(PyroFetesDbContext pyroFetesDbContext) : Endpoint<
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
Get("/api/sounds/{Id}");
|
||||
Get("/sounds/{Id}");
|
||||
AllowAnonymous();
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ public class UpdateSoundEndpoint(PyroFetesDbContext pyroFetesDbContext) : Endpoi
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
Put("/api/sounds/{Id}");
|
||||
Put("/sounds/{Id}");
|
||||
AllowAnonymous();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user