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:
commit
f8b62796f9
2 changed files with 94 additions and 94 deletions
|
@ -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*/) {
|
||||||
|
|
|
@ -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, {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue