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()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Post("/api/brands");
|
Put("/api/brands/{Id}");
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ public class UpdateClassificationEndpoint(PyroFetesDbContext pyrofetesdbcontext)
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Post("/api/classifications");
|
Put("/api/classifications");
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ public class UpdateMovementEndpoint(PyroFetesDbContext pyrofetesdbcontext) : End
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
Post("/api/movements");
|
Put("/api/movements");
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,11 +13,9 @@ public class DeleteWarehouseEndpoint(PyroFetesDbContext db) : Endpoint<DeleteWar
|
|||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
// L’annotation correcte du paramètre est {id}, pas {@id}
|
Delete("/api/warehouse/{id}");
|
||||||
Delete("/api/warehouse/{id}", x => new { x.Id });
|
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override async Task HandleAsync(DeleteWarehouseRequest req, CancellationToken ct)
|
public override async Task HandleAsync(DeleteWarehouseRequest req, CancellationToken ct)
|
||||||
{
|
{
|
||||||
// On charge aussi les WarehouseProducts liés pour les supprimer proprement
|
// On charge aussi les WarehouseProducts liés pour les supprimer proprement
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ public class GetWarehouseEndpoint(PyroFetesDbContext db)
|
|||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
// Pas de "@id" ici, juste {id}
|
// Pas de "@id" ici, juste {id}
|
||||||
Get("/api/warehouses/{id}", x => new { x.Id });
|
Get("/api/warehouses/{Id}");
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ public class UpdateWarehouseEndpoint(PyroFetesDbContext db)
|
|||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
// Utilise {id} plutôt que {@id}
|
// Utilise {id} plutôt que {@id}
|
||||||
Put("/api/warehouses/{id}", x => new { x.Id });
|
Put("/api/warehouses/{Id}");
|
||||||
AllowAnonymous();
|
AllowAnonymous();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="BCrypt" Version="1.0.0" />
|
|
||||||
<PackageReference Include="BCrypt.Net-Next" Version="4.0.3" />
|
<PackageReference Include="BCrypt.Net-Next" Version="4.0.3" />
|
||||||
<PackageReference Include="FastEndpoints" Version="7.0.1" />
|
<PackageReference Include="FastEndpoints" Version="7.0.1" />
|
||||||
<PackageReference Include="FastEndpoints.Security" Version="7.0.1" />
|
<PackageReference Include="FastEndpoints.Security" Version="7.0.1" />
|
||||||
|
|||||||
Reference in New Issue
Block a user