mirror of
https://github.com/documize/community.git
synced 2025-07-21 06:09:42 +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,
|
||||
|
||||
getBaseUrl(endpoint) {
|
||||
return [this.get('host'), endpoint].join('/');
|
||||
return [this.get('endpoint'), endpoint].join('/');
|
||||
},
|
||||
|
||||
boot(/*requestedUrl*/) {
|
||||
|
|
|
@ -23,7 +23,7 @@ export default Ember.Service.extend({
|
|||
type: 'POST',
|
||||
data: JSON.stringify(user),
|
||||
contentType: 'json'
|
||||
}).then(function(response){
|
||||
}).then(function (response) {
|
||||
return models.UserModel.create(response);
|
||||
});
|
||||
},
|
||||
|
@ -42,7 +42,7 @@ export default Ember.Service.extend({
|
|||
// Returns all users for organization.
|
||||
getAll() {
|
||||
return this.get('ajax').request(`users`).then((response) => {
|
||||
return response.map(function(obj){
|
||||
return response.map(function (obj) {
|
||||
return models.UserModel.create(obj);
|
||||
});
|
||||
});
|
||||
|
@ -54,9 +54,9 @@ export default Ember.Service.extend({
|
|||
|
||||
return this.get('ajax').request(url, {
|
||||
method: "GET"
|
||||
}).then((response)=>{
|
||||
}).then((response) => {
|
||||
let data = [];
|
||||
_.each(response, function(obj) {
|
||||
_.each(response, function (obj) {
|
||||
data.pushObject(models.UserModel.create(obj));
|
||||
});
|
||||
|
||||
|
@ -103,7 +103,7 @@ export default Ember.Service.extend({
|
|||
}
|
||||
|
||||
let data = JSON.stringify({
|
||||
Email: email
|
||||
email: email
|
||||
});
|
||||
|
||||
return this.get('ajax').request(url, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue