mirror of
https://github.com/immich-app/immich.git
synced 2025-11-23 23:00:42 +09:00
refactor(web): use new open api client (#7097)
* refactor(web): use new open api client * refactor: remove activity api * refactor: trash, oauth, and partner apis * refactor: job api * refactor: face, library, system config * refactor: user api * refactor: album api
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<script lang="ts">
|
||||
import { type AlbumResponseDto, api } from '@api';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
import Icon from '$lib/components/elements/icon.svelte';
|
||||
import Button from '../elements/buttons/button.svelte';
|
||||
import { handleError } from '../../utils/handle-error';
|
||||
import { updateAlbumInfo, type AlbumResponseDto } from '@immich/sdk';
|
||||
import { mdiImageAlbum } from '@mdi/js';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
import { handleError } from '../../utils/handle-error';
|
||||
import Button from '../elements/buttons/button.svelte';
|
||||
|
||||
export let album: AlbumResponseDto;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
const editUser = async () => {
|
||||
try {
|
||||
const { status } = await api.albumApi.updateAlbumInfo({
|
||||
await updateAlbumInfo({
|
||||
id: album.id,
|
||||
updateAlbumDto: {
|
||||
albumName: album.albumName,
|
||||
@@ -23,9 +23,7 @@
|
||||
},
|
||||
});
|
||||
|
||||
if (status === 200) {
|
||||
dispatch('editSuccess');
|
||||
}
|
||||
dispatch('editSuccess');
|
||||
} catch (error) {
|
||||
handleError(error, 'Unable to update user');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user