chore(web): generate API functions with a single argument ()

This commit is contained in:
Sergey Kondrikov 2023-05-28 04:52:22 +03:00 committed by GitHub
parent a460940430
commit 6c6c5ef651
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
65 changed files with 1913 additions and 491 deletions
web/src/lib/components/user-settings-page

View file

@ -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