Date fix for alerts and recent calls (#176)

* date fix for alerts and recent calls

* add a check for value to exist

* getRecentCalls with sip_callid

Co-authored-by: EgleHelms <e.helms@cognigy.com>
This commit is contained in:
EgleHandEgleHelms authored and GitHub committed 2023-01-23 07:40:23 -05:00
1 parent def7743b9e
commit fd29f986e4
5 files changed
+16 -16

No files matched your search

+6 -6
View File
@@ -530,19 +530,19 @@ export const getRecentCalls = (sid: string, query: Partial<CallQuery>) => {
);
};
export const getRecentCall = (sid: string, callSid: string) => {
export const getRecentCall = (sid: string, sipCallId: string) => {
return getFetch<TotalResponse>(
import.meta.env.DEV
? `${DEV_BASE_URL}/Accounts/${sid}/RecentCalls/${callSid}`
: `${API_ACCOUNTS}/${sid}/RecentCalls/${callSid}`
? `${DEV_BASE_URL}/Accounts/${sid}/RecentCalls/${sipCallId}`
: `${API_ACCOUNTS}/${sid}/RecentCalls/${sipCallId}`
);
};
export const getPcap = (sid: string, callSid: string) => {
export const getPcap = (sid: string, sipCallId: string) => {
return getBlob(
import.meta.env.DEV
? `${DEV_BASE_URL}/Accounts/${sid}/RecentCalls/${callSid}/pcap`
: `${API_ACCOUNTS}/${sid}/RecentCalls/${callSid}/pcap`
? `${DEV_BASE_URL}/Accounts/${sid}/RecentCalls/${sipCallId}/pcap`
: `${API_ACCOUNTS}/${sid}/RecentCalls/${sipCallId}/pcap`
);
};