set success, error, result correctly

pull/6843/head
Felix Höffken 6 years ago
parent 95ceb257f6
commit 73f12dbe77
  1. 4
      app/services/time_entries/delete_service.rb
  2. 2
      frontend/npm-shrinkwrap.json

@ -45,10 +45,10 @@ class TimeEntries::DeleteService
#
# @return True if the deletion has been initiated, false otherwise.
def call
validate_and_yield(time_entry, user) do
result, errors = validate_and_yield(time_entry, user) do
time_entry.destroy
end
ServiceResult.new(success: result, errors: errors, result: result)
ServiceResult.new(success: result, errors: errors, result: time_entry)
end
end

@ -7445,7 +7445,7 @@
"jquery-mockjax": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/jquery-mockjax/-/jquery-mockjax-2.2.2.tgz",
"integrity": "sha512-stVgUln5bo7g14KjeU45c31nAYlBHAUVBo4JbdoDYIJ3i6Nzlu8mkjKcAviwad9AU1dBEHHpuzA7R6mKcWgvZA==",
"integrity": "sha1-nH0rEDpEz2HJnMeKnueHhQS2CQc=",
"dev": true,
"requires": {
"jquery": ">=1.5.2"

Loading…
Cancel
Save