apiRequest resolves to reponse instead if reponse.data
This commit is contained in:
parent
520d5bc07e
commit
d65faa41b3
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
27
package-lock.json
generated
27
package-lock.json
generated
@ -2639,15 +2639,6 @@
|
|||||||
"object-assign": "4.1.1"
|
"object-assign": "4.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"file-loader": {
|
|
||||||
"version": "0.11.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/file-loader/-/file-loader-0.11.2.tgz",
|
|
||||||
"integrity": "sha1-T/HfKK84cZpgmAk7iMgscdF5SjQ=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"loader-utils": "1.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"filename-regex": {
|
"filename-regex": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz",
|
||||||
@ -6911,6 +6902,15 @@
|
|||||||
"integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=",
|
"integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"string_decoder": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
|
||||||
|
"integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"safe-buffer": "5.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"string-width": {
|
"string-width": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
|
||||||
@ -6944,15 +6944,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"string_decoder": {
|
|
||||||
"version": "1.0.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
|
|
||||||
"integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"safe-buffer": "5.1.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"stringstream": {
|
"stringstream": {
|
||||||
"version": "0.0.5",
|
"version": "0.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz",
|
||||||
|
@ -113,7 +113,7 @@ export default {
|
|||||||
})
|
})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
console.log(response);
|
console.log(response);
|
||||||
resolve(response.data);
|
resolve(response);
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.dir(error);
|
console.dir(error);
|
||||||
@ -167,10 +167,10 @@ export default {
|
|||||||
endpoint: $this.config.loginEndpoint,
|
endpoint: $this.config.loginEndpoint,
|
||||||
data: payload
|
data: payload
|
||||||
})
|
})
|
||||||
.then(data => {
|
.then(response => {
|
||||||
context.commit('setCredentials', payload);
|
context.commit('setCredentials', payload);
|
||||||
context.commit('setLogin', data);
|
context.commit('setLogin', response.data);
|
||||||
resolve(data.User);
|
resolve(response.data.User);
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
if (error.response && error.response.data && error.response.data.error) {
|
if (error.response && error.response.data && error.response.data.error) {
|
||||||
|
@ -68,9 +68,9 @@ export default {
|
|||||||
search
|
search
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then(rows => {
|
.then(response => {
|
||||||
this.hasMore = (rows.length >= limit);
|
this.hasMore = (response.data.length >= limit);
|
||||||
this.newRows = rows;
|
this.newRows = response.data;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
|
@ -114,9 +114,9 @@ export default {
|
|||||||
search
|
search
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then(rows => {
|
.then(response => {
|
||||||
this.hasMore = (rows.length >= limit);
|
this.hasMore = (response.data.length >= limit);
|
||||||
this.newRows = rows;
|
this.newRows = response.data;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
|
Loading…
Reference in New Issue
Block a user