Clarified code slightly

This commit is contained in:
James Ketr 2025-09-15 13:58:24 -07:00
parent 734f69fcae
commit 825544002e

View File

@ -35,10 +35,9 @@ const BotConfigComponent: React.FC<BotConfigProps> = ({ botInstanceId, botName,
setError(null);
// Use bot instance ID if available, otherwise fall back to bot name
const identifier = botInstanceId || botName;
const endpointPath = botInstanceId
? `/api/bots/config/schema/instance/${identifier}`
: `/api/bots/config/schema/${identifier}`;
? `/api/bots/config/schema/instance/${botInstanceId}`
: `/api/bots/config/schema/${botName}`;
// Use refresh endpoint if force refresh is requested
const url = forceRefresh ? `${base}${endpointPath}/refresh` : `${base}${endpointPath}`;