Merge pull request #1790 from spacejack/tutorial-remove-interpolation

Remove url interpolation from tutorial app
This commit is contained in:
Pierre-Yves Gérardy 2017-06-14 00:00:55 +02:00 committed by GitHub
commit 6a6b38aee7

View file

@ -392,8 +392,7 @@ var User = {
load: function(id) {
return m.request({
method: "GET",
url: "https://rem-rest-api.herokuapp.com/api/users/:id",
data: {id: id},
url: "https://rem-rest-api.herokuapp.com/api/users/" + id,
withCredentials: true,
})
.then(function(result) {
@ -508,8 +507,7 @@ var User = {
load: function(id) {
return m.request({
method: "GET",
url: "https://rem-rest-api.herokuapp.com/api/users/:id",
data: {id: id},
url: "https://rem-rest-api.herokuapp.com/api/users/" + id,
withCredentials: true,
})
.then(function(result) {
@ -520,7 +518,7 @@ var User = {
save: function() {
return m.request({
method: "PUT",
url: "https://rem-rest-api.herokuapp.com/api/users/:id",
url: "https://rem-rest-api.herokuapp.com/api/users/" + User.current.id,
data: User.current,
withCredentials: true,
})