1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-21 14:19:43 +02:00

Merge branch 'master' into github-tidy-up

This commit is contained in:
Elliott Stoneham 2016-07-26 19:55:53 +01:00
commit f8b62796f9
2 changed files with 94 additions and 94 deletions

View file

@ -31,7 +31,7 @@ export default Ember.Service.extend({
setupMode: false, setupMode: false,
getBaseUrl(endpoint) { getBaseUrl(endpoint) {
return [this.get('host'), endpoint].join('/'); return [this.get('endpoint'), endpoint].join('/');
}, },
boot(/*requestedUrl*/) { boot(/*requestedUrl*/) {

View file

@ -23,7 +23,7 @@ export default Ember.Service.extend({
type: 'POST', type: 'POST',
data: JSON.stringify(user), data: JSON.stringify(user),
contentType: 'json' contentType: 'json'
}).then(function(response){ }).then(function (response) {
return models.UserModel.create(response); return models.UserModel.create(response);
}); });
}, },
@ -42,7 +42,7 @@ export default Ember.Service.extend({
// Returns all users for organization. // Returns all users for organization.
getAll() { getAll() {
return this.get('ajax').request(`users`).then((response) => { return this.get('ajax').request(`users`).then((response) => {
return response.map(function(obj){ return response.map(function (obj) {
return models.UserModel.create(obj); return models.UserModel.create(obj);
}); });
}); });
@ -54,9 +54,9 @@ export default Ember.Service.extend({
return this.get('ajax').request(url, { return this.get('ajax').request(url, {
method: "GET" method: "GET"
}).then((response)=>{ }).then((response) => {
let data = []; let data = [];
_.each(response, function(obj) { _.each(response, function (obj) {
data.pushObject(models.UserModel.create(obj)); data.pushObject(models.UserModel.create(obj));
}); });
@ -103,7 +103,7 @@ export default Ember.Service.extend({
} }
let data = JSON.stringify({ let data = JSON.stringify({
Email: email email: email
}); });
return this.get('ajax').request(url, { return this.get('ajax').request(url, {