mirror of
https://github.com/immich-app/immich.git
synced 2025-12-19 09:13:14 +03:00
feat(web): add types to dispatcher (#5700)
* feat: add types to dispatcher * fix: create album name * pr feedback * pr feedback * pr feedback * fix: api key name * remove newSharedAlbum * pr feedback * fix: api key creation * on:close * fix: owner * fix: onclose * remove unused code --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
@@ -5,14 +5,17 @@
|
||||
|
||||
export let user: UserResponseDto;
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
const dispatch = createEventDispatcher<{
|
||||
success: void;
|
||||
fail: void;
|
||||
}>();
|
||||
|
||||
const restoreUser = async () => {
|
||||
const restoredUser = await api.userApi.restoreUser({ id: user.id });
|
||||
if (restoredUser.data.deletedAt == null) {
|
||||
dispatch('user-restore-success');
|
||||
dispatch('success');
|
||||
} else {
|
||||
dispatch('user-restore-fail');
|
||||
dispatch('fail');
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user