Skip to content
This repository has been archived by the owner on Nov 2, 2019. It is now read-only.

Commit

Permalink
q#
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleytqy committed Feb 5, 2018
1 parent bd083bf commit 76de039
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions app/js/controllers/entry-ctrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,14 @@ angular

$scope.addToMailingList = function(person) {
var access_token = 'f234e56583e242b25e3f76a7fe4e4789ab98ed0c';
var mailtrain_url = 'http://mailtrain.tnyu.org/api/subscribe/HJNc8AuSz'
var mailtrain_url = 'http://mailtrain.tnyu.org/api/subscribe/HJNc8AuSz';

$http({
method : 'POST',
method: 'POST',
crossDomain: true,
url : mailtrain_url + '?access_token=' + access_token,
data:
{
'EMAIL': person.attributes.contact.email,
'REQUIRE_CONFIRMATION': 'yes'
}
})
.success(function(response) {
url: mailtrain_url + '?access_token=' + access_token,
data: { 'EMAIL': person.attributes.contact.email, 'REQUIRE_CONFIRMATION': 'yes' }
}).success(function(response) {
alert('success! – ' + response.data.id)
})
};
Expand Down

0 comments on commit 76de039

Please sign in to comment.