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