fix: use key instead of id in appConfig
This commit is contained in:
@@ -30,16 +30,15 @@ function AdminApplicationCreateAuthClient(props) {
|
||||
} = useAdminCreateAppAuthClient(appKey);
|
||||
|
||||
const submitHandler = async (values) => {
|
||||
let appConfigId = appConfig?.data?.id;
|
||||
let appConfigKey = appConfig?.data?.key;
|
||||
|
||||
if (!appConfigId) {
|
||||
if (!appConfigKey) {
|
||||
const { data: appConfigData } = await createAppConfig({
|
||||
customConnectionAllowed: true,
|
||||
shared: false,
|
||||
disabled: false,
|
||||
});
|
||||
|
||||
appConfigId = appConfigData.id;
|
||||
appConfigKey = appConfigData.key;
|
||||
}
|
||||
|
||||
const { name, active, ...formattedAuthDefaults } = values;
|
||||
|
@@ -468,7 +468,7 @@ export const AppConfigPropType = PropTypes.shape({
|
||||
export const AppAuthClientPropType = PropTypes.shape({
|
||||
id: PropTypes.string,
|
||||
name: PropTypes.string,
|
||||
appConfigId: PropTypes.string,
|
||||
appConfigKey: PropTypes.string,
|
||||
authDefaults: PropTypes.string,
|
||||
formattedAuthDefaults: PropTypes.object,
|
||||
active: PropTypes.bool,
|
||||
|
Reference in New Issue
Block a user