Changed api response "result" to "data"

This commit is contained in:
2018-11-07 16:05:21 +00:00
parent e2330974f6
commit 6c7376f2e8
27 changed files with 227 additions and 270 deletions

View File

@@ -22,12 +22,19 @@ export default {
methods: {
login() {
if (this.input.username != "" && this.input.password != "") {
auth.authenticate(this.input.username, this.input.password, function(
data
) {
// eslint-disable-next-line
console.log("LOGIN.VUE::login() -> CB VERSION DATA:", data);
});
auth
.authenticate(this.input.username, this.input.password)
.then(response => {
// eslint-disable-next-line
console.log(
"LOGIN.VUE::login() -> SUCCESS",
response
);
})
.catch(function(error) {
// eslint-disable-next-line
console.log("LOGIN.VUE::login() !CATCH! -> Request failed", error);
});
// if (
// this.input.username == this.$store.state.mockAccount.username &&
@@ -40,20 +47,6 @@ export default {
// }
// } else {
// alert("A username and password must be present");
auth
.authenticatepromise(this.input.username, this.input.password)
.then(response => {
// eslint-disable-next-line
console.log(
"LOGIN.VUE::login() -> PROMISE VERSION RESPONSE:",
response
);
})
.catch(function(error) {
// eslint-disable-next-line
console.log("LOGIN.VUE::login() !CATCH! -> Request failed", error);
});
}
}
}