Skip to content

Commit 74f89e7

Browse files
committed
fix: workaround for participants
1 parent f739f91 commit 74f89e7

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/App/UserProfile/sagas.ts

+12-12
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,19 @@ function* fetchUserProfile(action: PayloadAction<string>) {
5858
api.participants.read,
5959
)) as MakeResponse<FetchParticipantsResponse>;
6060

61-
if (assignableParticipantsResponse.status !== 200) {
62-
throw new Error(JSON.stringify(assignableParticipantsResponse));
61+
if (assignableParticipantsResponse.status == 200) {
62+
// throw new Error(JSON.stringify(assignableParticipantsResponse));
63+
userProfile.assignableParticipants = assignableParticipantsResponse.data.participants;
64+
65+
const assignedParticipantsResponse = (yield call(api.userParticipants.read, {
66+
id: action.payload,
67+
})) as MakeResponse<FetchParticipantsResponse>;
68+
69+
if (assignedParticipantsResponse.status !== 200) {
70+
throw new Error(JSON.stringify(assignedParticipantsResponse));
71+
}
72+
userProfile.assignedParticipants = assignedParticipantsResponse.data.participants;
6373
}
64-
userProfile.assignableParticipants = assignableParticipantsResponse.data.participants;
65-
66-
const assignedParticipantsResponse = (yield call(api.userParticipants.read, {
67-
id: action.payload,
68-
})) as MakeResponse<FetchParticipantsResponse>;
69-
70-
if (assignedParticipantsResponse.status !== 200) {
71-
throw new Error(JSON.stringify(assignedParticipantsResponse));
72-
}
73-
userProfile.assignedParticipants = assignedParticipantsResponse.data.participants;
7474

7575
yield put(actions.setUserProfile(userProfile));
7676
} catch (e) {

0 commit comments

Comments
 (0)