File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -78,12 +78,10 @@ function* loginSaga(): SagaIterator {
7878 } )
7979
8080 yield takeEvery ( actionTypes . FETCH_USERNAME , function * ( ) {
81- const apiUsername = 'https://ivle.nus.edu.sg/api/Lapi.svc/UserName_Get'
82- const key = IVLE_KEY
83- const token = yield select ( ( state : IState ) => state . session . token )
84- const username = yield call ( ( ) =>
85- fetch ( `${ apiUsername } ?APIKey=${ key } &Token=${ token } ` ) . then ( response => response . json ( ) )
86- )
81+ // TODO: use an API call to the backend; an api call to IVLE raises an
82+ // uncaught error due to restrictive Access-Control-Allow-Origin headers,
83+ // causing the staging server to bug out
84+ const username = yield call ( ( ) => 'IVLE USER' )
8785 yield put ( actions . setUsername ( username ) )
8886 } )
8987}
You can’t perform that action at this time.
0 commit comments