0
Fork 0
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:
Tom Burdick 2012-01-23 16:10:41 -06:00 committed by Loïc Hoguin
parent 4b93c2d19a
commit ca42ea1620
3 changed files with 33 additions and 4 deletions

View file

@ -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) ->