Clarified code slightly
This commit is contained in:
parent
734f69fcae
commit
825544002e
@ -35,10 +35,9 @@ const BotConfigComponent: React.FC<BotConfigProps> = ({ botInstanceId, botName,
|
|||||||
setError(null);
|
setError(null);
|
||||||
|
|
||||||
// Use bot instance ID if available, otherwise fall back to bot name
|
// Use bot instance ID if available, otherwise fall back to bot name
|
||||||
const identifier = botInstanceId || botName;
|
|
||||||
const endpointPath = botInstanceId
|
const endpointPath = botInstanceId
|
||||||
? `/api/bots/config/schema/instance/${identifier}`
|
? `/api/bots/config/schema/instance/${botInstanceId}`
|
||||||
: `/api/bots/config/schema/${identifier}`;
|
: `/api/bots/config/schema/${botName}`;
|
||||||
|
|
||||||
// Use refresh endpoint if force refresh is requested
|
// Use refresh endpoint if force refresh is requested
|
||||||
const url = forceRefresh ? `${base}${endpointPath}/refresh` : `${base}${endpointPath}`;
|
const url = forceRefresh ? `${base}${endpointPath}/refresh` : `${base}${endpointPath}`;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user