Datenbank aufgefüllt und Einträge angepasst (bei 'Wie')

This commit is contained in:
2026-02-27 15:38:07 +00:00
parent 064036a74e
commit ebd031ee58
9 changed files with 233 additions and 92 deletions

View File

@@ -10,23 +10,23 @@ export async function PUT(
try {
const { id } = await context.params;
const body = await request.json();
const { Datum, WochTag, Wo, Was, Wieviel, Wie, OK } = body;
const { Datum, Wo, Was, Wieviel, Wie, TYP, OK } = body;
const pool = getDbPool();
const query = `
UPDATE Ausgaben
SET Datum = ?, WochTag = ?, Wo = ?, Was = ?, Wieviel = ?, Wie = ?, OK = ?
SET Datum = ?, Wo = ?, Was = ?, Wieviel = ?, Wie = ?, TYP = ?, OK = ?
WHERE ID = ?
`;
const [result] = await pool.query<ResultSetHeader>(query, [
Datum,
WochTag,
Wo,
Was,
parseFloat(Wieviel),
Wie,
TYP,
OK || 0,
parseInt(id),
]);