fixed submitting form
This commit is contained in:
@@ -7,9 +7,8 @@ import { getAll25 } from "./frontend.data.js";
|
|||||||
|
|
||||||
router.post("/frontend", async (req, res) => {
|
router.post("/frontend", async (req, res) => {
|
||||||
console.log(req.body);
|
console.log(req.body);
|
||||||
const data = await getAll25();
|
// 204 = "No Content"; beendet die Response sauber ohne Body
|
||||||
console.log(data);
|
res.sendStatus(204);
|
||||||
res.status(200);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default router;
|
export default router;
|
||||||
|
|||||||
@@ -204,16 +204,9 @@ export const MainForm = () => {
|
|||||||
<FormControlLabel control={<Checkbox />} label={t("transfer")} />
|
<FormControlLabel control={<Checkbox />} label={t("transfer")} />
|
||||||
<TextField required id="code" label={t("code")} variant="filled" />
|
<TextField required id="code" label={t("code")} variant="filled" />
|
||||||
{isLoading && <CircularProgress />}
|
{isLoading && <CircularProgress />}
|
||||||
<button type="submit">
|
<Button type="submit" variant="contained" disabled={isLoading}>
|
||||||
<Button
|
|
||||||
onClick={() => {
|
|
||||||
handleSubmit();
|
|
||||||
}}
|
|
||||||
variant="contained"
|
|
||||||
>
|
|
||||||
{t("submit")}
|
{t("submit")}
|
||||||
</Button>
|
</Button>
|
||||||
</button>
|
|
||||||
|
|
||||||
{msg && (
|
{msg && (
|
||||||
<Alert severity={msg.type}>
|
<Alert severity={msg.type}>
|
||||||
|
|||||||
Reference in New Issue
Block a user