This commit is contained in:
2020-06-19 17:20:23 +00:00
parent c1e688d824
commit dbe59f74d9
6 changed files with 25 additions and 56 deletions

View File

@@ -84,7 +84,7 @@
<script>
/* xeslint-disable */
import auth from "../api/auth";
import { processLogin, processLogout } from "../api/authutil";
export default {
@@ -281,14 +281,17 @@ export default {
vm.input.username == "superuser" && vm.input.password == "l3tm3in";
try {
let res = await window.$gz.api.upsertEx("auth", {
login: vm.input.username,
password: vm.input.password
});
let res = await window.$gz.api.upsert(
"auth",
{
login: vm.input.username,
password: vm.input.password
},
true
);
if (res.error) {
//todo, this is shitty if it's just a bad login creds so handle that here instead of in cacth block
debugger;
//don't expect this to ever get called but just in case
throw res.error;
}
await processLogin(res.data, loggedInWithKnownPassword);