Skip to content

Commit

Permalink
fix(ajax): modify for sanji-rest-ui upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
zack9433 committed Dec 8, 2015
1 parent d8d2257 commit 2cab129
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/component/component.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class CellularService {

get() {
let toPath = this.pathToRegexp.compile(config.get.url);
return this.rest.get(toPath(), (__DEV__) ? 'http://private-d8e84-sanjigeneric.apiary-mock.com' : undefined)
return this.rest.get(toPath(), (__DEV__) ? {basePath: 'http://private-d8e84-sanjigeneric.apiary-mock.com'} : undefined)
.then(res => {
this.data = this._transform(res.data);
})
Expand All @@ -59,7 +59,7 @@ class CellularService {
update(data) {
let toPath = this.pathToRegexp.compile(config.put.url);
let path = (undefined !== data.content.id) ? toPath({id: data.content.id}) : toPath();
return this.rest.put(path, data.content, data.formOptions.files, (__DEV__) ? 'http://private-d8e84-sanjigeneric.apiary-mock.com' : undefined)
return this.rest.put(path, data.content, data.formOptions.files, (__DEV__) ? {basePath: 'http://private-d8e84-sanjigeneric.apiary-mock.com' } : undefined)
.catch(err => {
this.exception.catcher('[CellularService] Update data error.')(err);
return this.$q.reject();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"angular-material": "~0.11.4",
"angular-material-icons": "~0.6.0",
"jquery": "~2.1.4",
"sanji-core-ui": "~1.9.1",
"sanji-core-ui": "~1.9.8",
"socket.io-client": "~1.3.7",
"svg-morpheus": "alexk111/SVG-Morpheus#v0.1.8",
"toastr": "~2.1.2"
Expand Down

0 comments on commit 2cab129

Please sign in to comment.