feat: Version 1.10.0 — DB-Zugriff auf PHP-Bridge (DB4js_all.php) umgestellt
- lib/db.ts entfernt, mysql2-Abhängigkeit gestrichen - lib/phpdb.ts: HTTP-Client für alle DB-Operationen via DB4js_all.php - Alle API-Routen und Server Actions auf phpdb.ts umgestellt - compose.yml / docker-compose.prod.yml: MySQL/phpMyAdmin-Container entfernt - app/api/DB4js_all.php/route.ts: Proxy für Statistik-AJAX-Calls - Statistik-Grafik liest ab 2026 live aus logbuch statt StatistikJahre - PHP 7.3-Kompatibilität: str_contains → strpos Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
import { redirect } from 'next/navigation';
|
||||
import { getSession, createSession } from '@/lib/session';
|
||||
import { hashPassword } from '@/lib/auth';
|
||||
import { query } from '@/lib/db';
|
||||
import { updateBeoPassword } from '@/lib/phpdb';
|
||||
|
||||
export async function changePassword(
|
||||
_prevState: { error: string } | undefined,
|
||||
@@ -28,10 +28,7 @@ export async function changePassword(
|
||||
}
|
||||
|
||||
const hashed = await hashPassword(newPassword);
|
||||
await query(
|
||||
'UPDATE beos SET pw = ?, MustChangePassword = 0 WHERE id = ?',
|
||||
[hashed, session.beoId]
|
||||
);
|
||||
await updateBeoPassword(session.beoId, hashed);
|
||||
|
||||
await createSession({
|
||||
kuerzel: session.kuerzel,
|
||||
|
||||
Reference in New Issue
Block a user