mirror of
https://github.com/immich-app/immich.git
synced 2025-07-03 21:40:00 +02:00
chore(web): generate API functions with a single argument (#2568)
This commit is contained in:
parent
a460940430
commit
6c6c5ef651
65 changed files with 1913 additions and 491 deletions
web/src/lib/components/user-settings-page
|
@ -40,7 +40,7 @@
|
|||
const handleCreate = async (event: CustomEvent<APIKeyResponseDto>) => {
|
||||
try {
|
||||
const dto = event.detail;
|
||||
const { data } = await api.keyApi.createKey(dto);
|
||||
const { data } = await api.keyApi.createKey({ aPIKeyCreateDto: dto });
|
||||
secret = data.secret;
|
||||
} catch (error) {
|
||||
handleError(error, 'Unable to create a new API Key');
|
||||
|
@ -58,7 +58,7 @@
|
|||
const dto = event.detail;
|
||||
|
||||
try {
|
||||
await api.keyApi.updateKey(editKey.id, { name: dto.name });
|
||||
await api.keyApi.updateKey({ id: editKey.id, aPIKeyUpdateDto: { name: dto.name } });
|
||||
notificationController.show({
|
||||
message: `Saved API Key`,
|
||||
type: NotificationType.Info
|
||||
|
@ -77,7 +77,7 @@
|
|||
}
|
||||
|
||||
try {
|
||||
await api.keyApi.deleteKey(deleteKey.id);
|
||||
await api.keyApi.deleteKey({ id: deleteKey.id });
|
||||
notificationController.show({
|
||||
message: `Removed API Key: ${deleteKey.name}`,
|
||||
type: NotificationType.Info
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue