Changed api response "result" to "data"
This commit is contained in:
@@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user