mirror of
https://github.com/logto-io/logto.git
synced 2025-03-31 22:51:25 -05:00
fix(console): reset applicaiton form data with parsed data (#5299)
This commit is contained in:
parent
155e13c064
commit
e025fd1ed5
1 changed files with 3 additions and 4 deletions
|
@ -1,6 +1,5 @@
|
|||
import {
|
||||
ApplicationType,
|
||||
type Application,
|
||||
type ApplicationResponse,
|
||||
type SnakeCaseOidcConfig,
|
||||
} from '@logto/schemas';
|
||||
|
@ -72,12 +71,12 @@ function ApplicationDetailsContent({ data, oidcConfig, onApplicationUpdated }: P
|
|||
return;
|
||||
}
|
||||
|
||||
await api
|
||||
const updatedData = await api
|
||||
.patch(`api/applications/${data.id}`, {
|
||||
json: applicationFormDataParser.toRequestPayload(formData),
|
||||
})
|
||||
.json<Application>();
|
||||
reset(formData);
|
||||
.json<ApplicationResponse>();
|
||||
reset(applicationFormDataParser.fromResponse(updatedData));
|
||||
onApplicationUpdated();
|
||||
toast.success(t('general.saved'));
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue