Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request #4 from howtwizer/musicans_destroy_promise_error_fix
Browse files Browse the repository at this point in the history
[fix] Uncaught (in promise) on musicians destroy action
  • Loading branch information
Guillaume Barillot committed Jun 11, 2018
2 parents 329b0b7 + fccc581 commit ebe9cf1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/api/admin/musicians_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def update

def destroy
if @musician.destroy
head 200
head 204
else
render json: {success: false, errors: @musician.errors.messages}.to_json, status: 422
end
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/packs/admin/components/musicians/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default {
destroy: function(user_id) {
if(confirm(this.$t('confirmation'))) {
this.$store.dispatch('MusicianStore/destroy', user_id).then(
response => {
() => {
this.$store.dispatch('MusicianStore/index');
}
)
Expand Down

0 comments on commit ebe9cf1

Please sign in to comment.