fix: TypeScript-Fehler behoben (stockfish types, null-Typ)

This commit is contained in:
Michess
2026-04-13 10:30:54 +02:00
parent 50464981c2
commit b79a442b0c
3 changed files with 14 additions and 3 deletions

View File

@@ -84,7 +84,7 @@ export const update = async (id: number, updatedUser: User & { password?: string
try {
let query = `UPDATE "user" SET name=$1, email=$2 WHERE id=$3 RETURNING id, name, email, wins, losses, draws, role, banned`;
let values: (string | number | undefined)[] = [updatedUser.name, updatedUser.email, id];
let values: (string | number | null | undefined)[] = [updatedUser.name, updatedUser.email, id];
if (updatedUser.password) {
query = `UPDATE "user" SET name=$1, email=$2, password=$3 WHERE id=$4 RETURNING id, name, email, wins, losses, draws, role, banned`;