From c09ce5947e663b602b10eedcf1700835e008d52a Mon Sep 17 00:00:00 2001 From: EgleH Date: Tue, 14 Feb 2023 21:34:11 +0100 Subject: [PATCH] Bug/speech backwards compatibility (#203) * add /Accounts api call back * add /accounts call back * include sp user into check --------- Co-authored-by: EgleHelms --- src/containers/internal/views/speech-services/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/containers/internal/views/speech-services/index.tsx b/src/containers/internal/views/speech-services/index.tsx index f8e207e..caa4a4e 100644 --- a/src/containers/internal/views/speech-services/index.tsx +++ b/src/containers/internal/views/speech-services/index.tsx @@ -87,7 +87,10 @@ export const SpeechServices = () => { useEffect(() => { setLocation(); - if (currentServiceProvider) { + + if (user?.scope !== USER_ACCOUNT && accountSid) { + setApiUrl(`Accounts/${accountSid}/SpeechCredentials`); + } else { setApiUrl( `ServiceProviders/${currentServiceProvider?.service_provider_sid}/SpeechCredentials` );