mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-15 01:21:09 +02:00
🩹 fix(voxelava): fix type errors in level types and user profile
- Make userId, createdAt, updatedAt nullable in LevelMetadata to match API - Disable password change feature (not supported by Mana Core Auth yet)
This commit is contained in:
parent
d3e11b320a
commit
3e3e9f33aa
2 changed files with 9 additions and 29 deletions
|
|
@ -49,7 +49,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
// Passwort ändern
|
||||
// Passwort ändern - TODO: Implement when Mana Core Auth supports password change for logged-in users
|
||||
async function handlePasswordChange() {
|
||||
// Validierung
|
||||
if (!newPassword || !confirmNewPassword) {
|
||||
|
|
@ -67,30 +67,10 @@
|
|||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
isPasswordChanging = true;
|
||||
passwordChangeError = '';
|
||||
|
||||
const success = await AuthService.updatePassword(newPassword);
|
||||
|
||||
if (success) {
|
||||
passwordChangeSuccess = 'Passwort erfolgreich geändert.';
|
||||
newPassword = '';
|
||||
confirmNewPassword = '';
|
||||
// Nach kurzer Verzögerung Passwort-Änderung ausblenden
|
||||
setTimeout(() => {
|
||||
showPasswordChange = false;
|
||||
passwordChangeSuccess = '';
|
||||
}, 3000);
|
||||
} else {
|
||||
passwordChangeError = 'Fehler beim Ändern des Passworts.';
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Password change error:', error);
|
||||
passwordChangeError = 'Ein Fehler ist aufgetreten. Bitte versuche es später erneut.';
|
||||
} finally {
|
||||
isPasswordChanging = false;
|
||||
}
|
||||
// Note: Password change is not yet supported by Mana Core Auth
|
||||
// Use the "Passwort zurücksetzen" feature on the login page instead
|
||||
passwordChangeError =
|
||||
'Passwortänderung ist noch nicht verfügbar. Bitte nutze "Passwort vergessen" auf der Anmeldeseite.';
|
||||
}
|
||||
|
||||
// Abmelden
|
||||
|
|
|
|||
|
|
@ -51,13 +51,13 @@ export interface LevelMetadata {
|
|||
/** Beschreibung des Levels */
|
||||
description: string;
|
||||
/** ID des Benutzers, der das Level erstellt hat */
|
||||
userId: string;
|
||||
userId: string | null;
|
||||
/** Zeitpunkt der Erstellung des Levels */
|
||||
createdAt: string;
|
||||
createdAt: string | null;
|
||||
/** Zeitpunkt der letzten Aktualisierung des Levels */
|
||||
updatedAt: string;
|
||||
updatedAt: string | null;
|
||||
/** Gibt an, ob das Level öffentlich ist */
|
||||
isPublic?: boolean;
|
||||
isPublic?: boolean | null;
|
||||
/** Anzahl der Aufrufe des Levels */
|
||||
playCount: number;
|
||||
/** Anzahl der Likes des Levels */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue