mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-15 12:40:25 +00:00
Handle delete better when no delete_resource function is implemented
This commit is contained in:
parent
4b93c2d19a
commit
ca42ea1620
3 changed files with 33 additions and 4 deletions
|
@ -648,7 +648,7 @@ method(Req, State) ->
|
|||
|
||||
%% delete_resource/2 should start deleting the resource and return.
|
||||
delete_resource(Req, State) ->
|
||||
expect(Req, State, delete_resource, true, fun delete_completed/2, 500).
|
||||
expect(Req, State, delete_resource, false, 500, fun delete_completed/2).
|
||||
|
||||
%% delete_completed/2 indicates whether the resource has been deleted yet.
|
||||
delete_completed(Req, State) ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue