Skip to content

Add DELETE endpoint for gods by ID#4

Draft
Claude wants to merge 2 commits intomainfrom
claude/add-endpoint-deleted-god-by-id
Draft

Add DELETE endpoint for gods by ID#4
Claude wants to merge 2 commits intomainfrom
claude/add-endpoint-deleted-god-by-id

Conversation

@Claude
Copy link

@Claude Claude AI commented Feb 19, 2026

Implements DELETE /api/v1/gods/{id} endpoint to remove gods from the system.

Changes:

  • Repository Layer: Added DeleteGodByIdAsync(int id) to IGodRepository interface and implementations

    • Returns bool indicating success (true) or not found (false)
    • Uses FirstOrDefaultAsync for safe entity lookup without throwing exceptions
  • Endpoint: Added DeleteGodById static method mapped to DELETE /api/v1/gods/{id}

    • Returns 204 No Content on successful deletion
    • Returns 404 Not Found when god doesn't exist
  • Tests: Added unit and integration test coverage for both success and not-found scenarios

// Endpoint implementation
public static async Task<IResult> DeleteGodById(int id, IGodRepository repository)
{
    var result = await repository.DeleteGodByIdAsync(id);
    return result ? Results.NoContent() : Results.NotFound();
}
Original prompt

This section details on the original issue you should resolve

<issue_title>Add new Endpoint Delete Gods</issue_title>
<issue_description>Add new Endpoint "DeletedGodByID" in "Endpoints/v1/Gods.cs".</issue_description>

Comments on the Issue (you are @claude[agent] in this section)

Co-authored-by: aatmmr <15815012+aatmmr@users.noreply.github.com>
@Claude Claude AI changed the title [WIP] Add new endpoint to delete gods by ID Add DELETE endpoint for gods by ID Feb 19, 2026
@Claude Claude AI requested a review from aatmmr February 19, 2026 13:31
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.

Add new Endpoint Delete Gods

2 participants

Comments