changed code formatting

This commit is contained in:
2026-05-18 18:11:46 +02:00
parent 3832aca12c
commit 8932f5d004
5 changed files with 9 additions and 11 deletions
-1
View File
@@ -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;
-2
View File
@@ -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);
}); });
+7 -4
View File
@@ -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"),
});
} }
}; };
+1 -1
View File
@@ -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",
+1 -3
View File
@@ -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);
} }