Changeset 0.25.3 (#163)
This commit is contained in:
@@ -252,9 +252,9 @@ const Pages = {
|
||||
// ── User Settings (settings surface) ─────
|
||||
|
||||
async saveProfile() {
|
||||
const name = _val('settingsDisplayName');
|
||||
const name = _val('profileDisplayName');
|
||||
if (!name) { _toast('Display name is required', 'error'); return; }
|
||||
const ok = await _api('PUT', '/api/v1/users/me', { display_name: name });
|
||||
const ok = await _api('PUT', '/api/v1/profile', { display_name: name });
|
||||
if (ok) _toast('Profile saved', 'success');
|
||||
},
|
||||
|
||||
@@ -265,7 +265,7 @@ const Pages = {
|
||||
if (!current || !newPw) { _toast('All password fields are required', 'error'); return; }
|
||||
if (newPw !== confirm) { _toast('Passwords do not match', 'error'); return; }
|
||||
if (newPw.length < 8) { _toast('Password must be at least 8 characters', 'error'); return; }
|
||||
const ok = await _api('PUT', '/api/v1/auth/password', { current_password: current, new_password: newPw });
|
||||
const ok = await _api('POST', '/api/v1/profile/password', { current_password: current, new_password: newPw });
|
||||
if (ok) {
|
||||
_toast('Password changed', 'success');
|
||||
_val('settingsCurrentPw', '');
|
||||
|
||||
Reference in New Issue
Block a user