Commit 74f89e7 1 parent f739f91 commit 74f89e7 Copy full SHA for 74f89e7
File tree 1 file changed +12
-12
lines changed
1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -58,19 +58,19 @@ function* fetchUserProfile(action: PayloadAction<string>) {
58
58
api . participants . read ,
59
59
) ) as MakeResponse < FetchParticipantsResponse > ;
60
60
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 ;
63
73
}
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 ;
74
74
75
75
yield put ( actions . setUserProfile ( userProfile ) ) ;
76
76
} catch ( e ) {
You can’t perform that action at this time.
0 commit comments