mirror of
https://github.com/immich-app/immich.git
synced 2025-11-15 11:32:35 +09:00
refactor(server): user endpoints (#9730)
* refactor(server): user endpoints * fix repos * fix unit tests --------- Co-authored-by: Daniel Dietzler <mail@ddietzler.dev> Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
@@ -2,9 +2,8 @@
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
import Button from '../elements/buttons/button.svelte';
|
||||
import PasswordField from '../shared-components/password-field.svelte';
|
||||
import { updateUser, type UserResponseDto } from '@immich/sdk';
|
||||
import { updateMyUser } from '@immich/sdk';
|
||||
|
||||
export let user: UserResponseDto;
|
||||
let errorMessage: string;
|
||||
let success: string;
|
||||
|
||||
@@ -31,13 +30,7 @@
|
||||
if (valid) {
|
||||
errorMessage = '';
|
||||
|
||||
await updateUser({
|
||||
updateUserDto: {
|
||||
id: user.id,
|
||||
password: String(password),
|
||||
shouldChangePassword: false,
|
||||
},
|
||||
});
|
||||
await updateMyUser({ userUpdateMeDto: { password: String(password) } });
|
||||
|
||||
dispatch('success');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user