Refactoring and removing unused things

This commit is contained in:
cami 2021-07-22 02:40:58 +02:00
parent 959912bd9b
commit e7407fd40b
2 changed files with 1 additions and 27 deletions

View file

@ -134,7 +134,6 @@ def protected():
@app.route('/api/protected/rcv_pw', methods=['GET'])
# @flask_praetorian.auth_required
def get_password():
pw = get_random_password()
ret = {'password': pw}

View file

@ -68,7 +68,6 @@ export default function Study() {
setIsStepStart(false);
setIsStepNormal(true);
handleLoggerOn();
// forceUpdate();
};
const handleClickAtStepNormal = () => {
@ -87,30 +86,6 @@ export default function Study() {
handleLoggerOff();
};
const onSubmitClick = (e) => {
e.preventDefault();
let opts = {
username: username,
password: password,
};
fetch("/api/protected/behavior", {
method: "post",
body: JSON.stringify(opts),
}).then((response) => {
console.log(response.status);
if (response.status === 401) {
response.json().then((resp) => {
console.log("nicht so wirklich gut");
// setErrorMessage(resp.message);
});
} else {
response.json().then((token) => {
console.log("Alles gut :-)");
});
}
});
};
const study_start = (
<>
<BehaviorStudyInfo />
@ -189,7 +164,7 @@ export default function Study() {
const study_standing = (
<>
<BehaviorStanding />
<form id="behaviorPhone">
<form id="behaviorStanding">
<InputField
LabelName="Benutzername"
onChange={handleUsernameChange}