Merge pull request #468 from guido4000/patch-1

Rename endpoint for consistent endpoint names
This commit is contained in:
Joe Nelson
2016-01-21 08:25:59 -08:00
+1 -1
View File
@@ -175,7 +175,7 @@ WHERE
Now whenever you are authenticated in your Rails application you can use some Javascript Now whenever you are authenticated in your Rails application you can use some Javascript
code to get the token and use it: code to get the token and use it:
```javascript ```javascript
$.getJSON('/api_json').done(function(data){ $.getJSON('/api_token').done(function(data){
$.ajax('/orders', {'Authorization': 'Bearer ' + data.token}).done(function(data){ $.ajax('/orders', {'Authorization': 'Bearer ' + data.token}).done(function(data){
console.log('Visible Orders: ', data); console.log('Visible Orders: ', data);
}) })