Skip to content

Commit 2af35a2

Browse files
committed
refactor: extract path constants
1 parent d907507 commit 2af35a2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/core/src/components/BrandConcierge/createConversationServiceRequest.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,18 @@ governing permissions and limitations under the License.
1111
*/
1212
import { createRequest } from "../../utils/request/index.js";
1313

14+
const BRAND_CONCIERGE_PATH = "/brand-concierge";
15+
const VOICE_BRAND_CONCIERGE_PATH = "/brand-concierge-voice";
16+
1417
export default ({
1518
payload,
1619
action = "conversations",
1720
sessionId,
1821
voiceEnabled = false,
1922
}) => {
2023
const edgeSubPath = voiceEnabled
21-
? "/brand-concierge-voice"
22-
: "/brand-concierge";
24+
? VOICE_BRAND_CONCIERGE_PATH
25+
: BRAND_CONCIERGE_PATH;
2326

2427
return createRequest({
2528
payload: payload,

0 commit comments

Comments
 (0)