Advertisement
Guest User

Untitled

a guest
Jul 11th, 2019
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. deletePitch: (pitchId) ->
  2.     self = @
  3.     $('#confirm-delete-pitch').off('click').on 'click', ->
  4.       self.api.deletePitch(pitchId, self.flashErrorMessage)
  5.         .then((data) -> (
  6.           if data.error
  7.             self.flashErrorMessage(data.error)
  8.             self.deleteConfirmationModal.close()
  9.           else
  10.             self.flashSuccessMessage(data.message)
  11.             window.location.reload()
  12.         ))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement