🧠 logic cleanup in Login component

This commit is contained in:
Philipp Dormann 2020-12-22 18:16:08 +01:00
parent 20ee0c1a9e
commit 90be4200ca

View File

@ -3,14 +3,12 @@
import { _ } from "svelte-i18n";
store.init();
import { push, pop, replace } from "svelte-spa-router";
//
import { OpenAPI, AuthService } from "@odit/lfk-client-js";
OpenAPI.BASE = config.baseurl;
//
import Toastify from "toastify-js";
import "toastify-js/src/toastify.css";
let usersUsername,
usersPassword = "";
let usersUsername;
let usersPassword = "";
let last_loginclick_processed = true;
const login = async () => {
@ -23,10 +21,10 @@
}).showToast();
let username = usersUsername;
let password = usersPassword;
// if (usersUsername.length == 0) {
// if ((usersUsername + "").length == 0) {
username = config.fallback_username || "demo";
// }
// if (usersPassword.length == 0) {
// if ((usersPassword + "").length == 0) {
password = config.fallback_password || "demo";
// }
AuthService.authControllerLogin({