Bugfix in ts_api:delete_entry/1, bad case clause ordering.

This commit is contained in:
Jonathan Bernard 2011-03-10 16:00:46 -06:00
parent 39c3b83d3f
commit 3c3d553768

View File

@ -487,6 +487,8 @@ delete_entry(YArg, Username, TimelineId, EntryId) ->
% find the record to delete % find the record to delete
case ts_entry:lookup(Username, TimelineId, EntryId) of case ts_entry:lookup(Username, TimelineId, EntryId) of
no_record -> make_json_404(YArg);
Record -> Record ->
% try to delete % try to delete
case ts_entry:delete(Record) of case ts_entry:delete(Record) of
@ -494,9 +496,7 @@ delete_entry(YArg, Username, TimelineId, EntryId) ->
Error -> Error ->
io:format("Error occurred deleting entry record: ~p", [Error]), io:format("Error occurred deleting entry record: ~p", [Error]),
make_json_500(YArg) make_json_500(YArg)
end; end
no_record -> make_json_404(YArg)
end. end.
% ============================== % % ============================== %