Skip to content

Csp 2077 delete location endpoint #2277

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MarkFCain
Copy link
Contributor

No description provided.

@MarkFCain MarkFCain force-pushed the CSP-2077-DeleteLocationEndpoint branch from 042fac2 to f7b3a3e Compare July 9, 2025 08:11
@MarkFCain MarkFCain force-pushed the CSP-2077-DeleteLocationEndpoint branch from 8af530b to 024e05a Compare July 9, 2025 10:40
namespace SFA.DAS.RoatpCourseManagement.Api.Controllers;

[ApiController]
[Route("providers/{ukprn}/locations/{id}/delete")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should be using DELETE verb instead of having delete in the url

Copy link

Quality Gate Passed Quality Gate passed for 'das-apim-endpoints-RoatpCourseManagement'

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

public class ProviderLocationDeleteController(ILogger<ProviderLocationDeleteController> logger, IMediator mediator) : ControllerBase
{
[HttpDelete]
public async Task<IActionResult> DeleteProviderLocation([FromRoute] int ukprn, [FromRoute] Guid id, DeleteProviderLocationCommand command)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding command here gives wrong impression of adding ukprn and location id in to the body. Use a model instead with the properties that you need and then create a command in the action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants