INFRA-3664 : Change endpoint for fetching incident participants data
This commit is contained in:
@@ -20,7 +20,7 @@ export const FETCH_INCIDENT_DATA = (payload: any): string => {
|
||||
};
|
||||
|
||||
export const FETCH_PARTICIPANTS_DATA = (payload: string): string => {
|
||||
return `${URL_PREFIX}/users?channel_id=${payload}`;
|
||||
return `${URL_PREFIX}/incident-user?incident_id==${payload}`;
|
||||
};
|
||||
|
||||
export const FETCH_HEADER_DETAILS = `${URL_PREFIX}/incidents/header`;
|
||||
|
||||
@@ -51,7 +51,7 @@ const useIncidentApis = (): useIncidentApiProps => {
|
||||
.then(response => {
|
||||
dispatch(setIncidentData(response?.data?.data));
|
||||
fetchIncidentLog(incidentId);
|
||||
fetchParticipants(response?.data?.data?.slackChannel);
|
||||
fetchParticipants(response?.data?.data?.id);
|
||||
})
|
||||
.catch(handleApiError);
|
||||
};
|
||||
@@ -65,8 +65,8 @@ const useIncidentApis = (): useIncidentApiProps => {
|
||||
.catch(handleApiError);
|
||||
};
|
||||
|
||||
const fetchParticipants = (slackChannel: string): void => {
|
||||
const endPoint = FETCH_PARTICIPANTS_DATA(slackChannel);
|
||||
const fetchParticipants = (incidentId: string): void => {
|
||||
const endPoint = FETCH_PARTICIPANTS_DATA(incidentId);
|
||||
ApiService.get(endPoint)
|
||||
.then(response => {
|
||||
dispatch(setParticipantsData(response?.data?.data));
|
||||
|
||||
Reference in New Issue
Block a user