Skip to content

Commit

Permalink
#29 urlencode the promo code
Browse files Browse the repository at this point in the history
  • Loading branch information
syjer committed Jan 11, 2015
1 parent 50cdddb commit f8f65bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/webapp/resources/js/admin/service/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
return $http['post']('/admin/api/events/' + eventId + '/promo-code', promoCode).error(HttpErrorHandler.handle);
},
remove: function(eventId, promoCode) {
return $http['delete']('/admin/api/events/' + eventId + '/promo-code/' + promoCode).error(HttpErrorHandler.handle);
return $http['delete']('/admin/api/events/' + eventId + '/promo-code/' + encodeURIComponent(promoCode)).error(HttpErrorHandler.handle);
},
list: function(eventId) {
return $http.get('/admin/api/events/' + eventId + '/promo-code').error(HttpErrorHandler.handle);
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/resources/js/event/show-event.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
$('#error-code-not-found').addClass('hidden');
if(promoCodeVal != null && promoCodeVal.trim() != "") {
jQuery.ajax({
url: 'promoCode/'+promoCodeVal,
url: 'promoCode/'+encodeURIComponent(promoCodeVal),
type: 'POST',
data: frm.serialize(),
success: function(result) {
Expand Down

0 comments on commit f8f65bd

Please sign in to comment.