changed code formatting
This commit is contained in:
@@ -28,7 +28,6 @@ export const confirmUser = async (username) => {
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
if (rows.length > 0) {
|
if (rows.length > 0) {
|
||||||
console.log(rows);
|
|
||||||
const { first_name, last_name } = rows[0];
|
const { first_name, last_name } = rows[0];
|
||||||
const fullname = first_name + " " + last_name;
|
const fullname = first_name + " " + last_name;
|
||||||
|
|
||||||
|
|||||||
@@ -11,8 +11,6 @@ router.post("/new-entry", async (req, res) => {
|
|||||||
if (!result.success) {
|
if (!result.success) {
|
||||||
return res.status(500).json({ message: "Form Data Invalid" });
|
return res.status(500).json({ message: "Form Data Invalid" });
|
||||||
}
|
}
|
||||||
console.log(req.body);
|
|
||||||
console.log(username);
|
|
||||||
res.sendStatus(204);
|
res.sendStatus(204);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -122,7 +122,6 @@ export const MainForm = () => {
|
|||||||
|
|
||||||
const handleUserSelection = (username: string | null) => {
|
const handleUserSelection = (username: string | null) => {
|
||||||
if (username == null || username == "") {
|
if (username == null || username == "") {
|
||||||
console.log("Username must be set!");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -161,12 +160,16 @@ export const MainForm = () => {
|
|||||||
} else {
|
} else {
|
||||||
setMsg({
|
setMsg({
|
||||||
type: "danger",
|
type: "danger",
|
||||||
headline: t("error"),
|
headline: t("form-submission-failed"),
|
||||||
text: result.error || t("form-submission-failed"),
|
text: result.error || t("form-submission-failed"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (error) {
|
||||||
console.log("remove");
|
setMsg({
|
||||||
|
type: "danger",
|
||||||
|
headline: t("error"),
|
||||||
|
text: t("form-submission-failed"),
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
"user": "Benutzer",
|
"user": "Benutzer",
|
||||||
"next-id": "Nächste Eintragsnummer: ",
|
"next-id": "Nächste Eintragsnummer: ",
|
||||||
"form-submitted-successfully": "Formular erfolgreich übermittelt!",
|
"form-submitted-successfully": "Formular erfolgreich übermittelt!",
|
||||||
"orm-submission-failed": "Formularübermittlung fehlgeschlagen.",
|
"form-submission-failed": "Formularübermittlung fehlgeschlagen.",
|
||||||
"success": "Erfolg",
|
"success": "Erfolg",
|
||||||
"error": "Fehler",
|
"error": "Fehler",
|
||||||
"cash": "Bar",
|
"cash": "Bar",
|
||||||
|
|||||||
@@ -7,9 +7,7 @@ export const options = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default function () {
|
export default function () {
|
||||||
http.get(
|
http.get("http://localhost:8004/default/confirm-user?username=TheisGaedigk");
|
||||||
"http://localhost:8004/default/confirm-user?username=TheisGaedigk",
|
|
||||||
);
|
|
||||||
http.get("http://localhost:8004/default/users");
|
http.get("http://localhost:8004/default/users");
|
||||||
sleep(1);
|
sleep(1);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user