Skip to content

Commit e22e378

Browse files
author
Danilo-Oliveira-Silva
committed
chore: example
1 parent 9f2a03f commit e22e378

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

TestApi/Controllers/ClientController.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,15 @@ public ActionResult Update(int id, ClientRequest request)
3131

3232
return Ok(clientUpdated);
3333
}
34+
35+
[HttpDelete("{id}")]
36+
public ActionResult Delete(int id)
37+
{
38+
var removed = _clients.RemoveAll(c => c.Id == id);
39+
40+
if (removed == 0)
41+
return NotFound("Client not found");
42+
43+
return NoContent();
44+
}
3445
}

0 commit comments

Comments
 (0)