Update DELETE endpoints to use [FromQuery] parameters
Refactored all relevant controller DELETE actions to accept command/procedure parameters from the query string ([FromQuery]) instead of the request body ([FromBody]). Updated XML documentation and method signatures to reflect this change, including renaming parameters from "procedure" to "command" where appropriate. Also removed the unused IConfiguration dependency from EndpointAuthController.
This commit is contained in:
@@ -39,14 +39,14 @@ public class EndpointParamsController(IMediator mediator) : ControllerBase
|
||||
/// <summary>
|
||||
/// Deletes endpoint parameter records via the ENDPOINT_PARAMS delete procedure for the specified id range.
|
||||
/// </summary>
|
||||
/// <param name="procedure">DeleteEndpointParamsProcedure payload (Start, End, Force).</param>
|
||||
/// <param name="command">DeleteEndpointParamsProcedure payload (Start, End, Force).</param>
|
||||
/// <param name="cancel">A token to cancel the operation.</param>
|
||||
/// <returns>No content on success.</returns>
|
||||
[HttpDelete]
|
||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||
public async Task<IActionResult> Delete([FromBody] DeleteEndpointParamsCommand procedure, CancellationToken cancel)
|
||||
public async Task<IActionResult> Delete([FromQuery] DeleteEndpointParamsCommand command, CancellationToken cancel)
|
||||
{
|
||||
await mediator.Send(procedure, cancel);
|
||||
await mediator.Send(command, cancel);
|
||||
return NoContent();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user