Bugfix in ts_api:delete_entry/1, bad case clause ordering.
This commit is contained in:
parent
39c3b83d3f
commit
3c3d553768
@ -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.
|
||||||
|
|
||||||
% ============================== %
|
% ============================== %
|
||||||
|
Loading…
x
Reference in New Issue
Block a user