forked from sanchezvem/PyroFetes
Normalement c'est réglé !
This commit is contained in:
@@ -8,7 +8,7 @@ public class UpdateBrandEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endpoi
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
Post("/api/brands");
|
||||
Put("/api/brands/{Id}");
|
||||
AllowAnonymous();
|
||||
}
|
||||
|
||||
|
@@ -8,7 +8,7 @@ public class UpdateClassificationEndpoint(PyroFetesDbContext pyrofetesdbcontext)
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
Post("/api/classifications");
|
||||
Put("/api/classifications");
|
||||
AllowAnonymous();
|
||||
}
|
||||
|
||||
|
@@ -8,7 +8,7 @@ public class UpdateMovementEndpoint(PyroFetesDbContext pyrofetesdbcontext) : End
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
Post("/api/movements");
|
||||
Put("/api/movements");
|
||||
AllowAnonymous();
|
||||
}
|
||||
|
||||
|
@@ -13,11 +13,9 @@ public class DeleteWarehouseEndpoint(PyroFetesDbContext db) : Endpoint<DeleteWar
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
// L’annotation correcte du paramètre est {id}, pas {@id}
|
||||
Delete("/api/warehouse/{id}", x => new { x.Id });
|
||||
Delete("/api/warehouse/{id}");
|
||||
AllowAnonymous();
|
||||
}
|
||||
|
||||
public override async Task HandleAsync(DeleteWarehouseRequest req, CancellationToken ct)
|
||||
{
|
||||
// On charge aussi les WarehouseProducts liés pour les supprimer proprement
|
||||
|
@@ -16,7 +16,7 @@ public class GetWarehouseEndpoint(PyroFetesDbContext db)
|
||||
public override void Configure()
|
||||
{
|
||||
// Pas de "@id" ici, juste {id}
|
||||
Get("/api/warehouses/{id}", x => new { x.Id });
|
||||
Get("/api/warehouses/{Id}");
|
||||
AllowAnonymous();
|
||||
}
|
||||
|
||||
|
@@ -12,7 +12,7 @@ public class UpdateWarehouseEndpoint(PyroFetesDbContext db)
|
||||
public override void Configure()
|
||||
{
|
||||
// Utilise {id} plutôt que {@id}
|
||||
Put("/api/warehouses/{id}", x => new { x.Id });
|
||||
Put("/api/warehouses/{Id}");
|
||||
AllowAnonymous();
|
||||
}
|
||||
|
||||
|
@@ -7,12 +7,11 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="BCrypt" Version="1.0.0" />
|
||||
<PackageReference Include="BCrypt.Net-Next" Version="4.0.3" />
|
||||
<PackageReference Include="FastEndpoints" Version="7.0.1" />
|
||||
<PackageReference Include="FastEndpoints.Security" Version="7.0.1" />
|
||||
<PackageReference Include="FastEndpoints.Swagger" Version="7.0.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.19"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.19" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.20" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.20">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
@@ -20,7 +19,7 @@
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.20" />
|
||||
<PackageReference Include="PasswordGenerator" Version="2.1.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2"/>
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
Reference in New Issue
Block a user