Skip to content
Permalink
Browse files

Change API calls to relative paths

  • Loading branch information
john committed Apr 24, 2017
1 parent 0017766 commit 84fd2e57b8ca9eefc2f71a51c240c6a1563b30f5
Showing with 2 additions and 2 deletions.
  1. +2 −2 public/js/app.js
@@ -33,7 +33,7 @@ $(document).ready(function(){
var params = new URLSearchParams();
params.append('action', 'mark_unread');
params.append('message_id', message_id);
axios.post('/api.php', params).then(function(response) {
axios.post('api.php', params).then(function(response) {
message_icon.html('check');
message_icon.removeClass('red-text');
});
@@ -69,7 +69,7 @@ $(document).ready(function(){
params.append('user_id', user_id);
params.append('recipient', recipient_elem.val());
params.append('message', compose_elem.val());
axios.post('/api.php', params).then(function(response) {
axios.post('api.php', params).then(function(response) {
if (response.data[0] == 'unknown_recipient') {
recipient_elem.addClass('invalid');
$('#recipient-label').attr('data-error', 'User not found');

0 comments on commit 84fd2e5

Please sign in to comment.
You can’t perform that action at this time.