Skip to content

Commit

Permalink
Adding note to Delete endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
ardalis committed Apr 30, 2020
1 parent a47bc9a commit 3025d60
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sample/SampleEndpointApp/AuthorEndpoints/Delete.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public override async Task<ActionResult<DeletedAuthorResult>> HandleAsync(int id
if (author == null) return NotFound(id);
await _repository.DeleteAsync(author);

// return NoContent(); another option; see https://restfulapi.net/http-methods/#delete
return Ok(new DeletedAuthorResult { DeletedAuthorId = id });
}
}
Expand Down

0 comments on commit 3025d60

Please sign in to comment.