Add HTTP DELETE endpoint to CommonController

A new `DeleteObject` method has been added to the `CommonController` class to handle HTTP DELETE requests. This method is asynchronous and processes a `DeleteObjectProcedure` object passed in the request body using the `mediator.Send` function. The result is returned as an HTTP 200 OK response. The `[HttpDelete]` attribute has been applied to the method to designate it as a DELETE endpoint.
This commit is contained in:
Developer 02
2026-01-16 01:08:30 +01:00
parent 60e1627494
commit a5160b35dd

View File

@@ -23,4 +23,11 @@ public class CommonController(IMediator mediator) : ControllerBase
var result = await mediator.Send(procedure, cancel);
return Ok(result);
}
[HttpDelete]
public async Task<IActionResult> DeleteObject([FromBody] DeleteObjectProcedure procedure, CancellationToken cancel)
{
var result = await mediator.Send(procedure, cancel);
return Ok(result);
}
}