Created
November 9, 2017 14:27
-
-
Save mkessler/97f3525b0043bb10e0cd9f910fd42ff9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if store = Store.find_by_email(params['sender']) | |
| puts "Store exists for #{params['sender']}" | |
| message_url = params['message-url'].gsub('https://', '') | |
| RestClient.post "https://api:#{ENV['MAILGUN_API_KEY']}"\ | |
| "@#{message_url}", | |
| from: store.email, | |
| to: "[email protected]" | |
| head 200 | |
| else | |
| #store doesn't exist, don't send to Parseur | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment