UNPKG

symphony-integration-commons

Version:

Common components for 3rd party developers build the user facing application for Symphony Integrations.

12 lines (10 loc) 320 B
import { call, put } from 'redux-saga/effects'; import { getUserId as getUser } from './apiCalls'; export function* getUserId() { try { const userId = yield call(getUser); yield put({ type: 'FETCH_USER_ID_SUCCESS', payload: userId }); } catch (error) { yield put({ type: 'FETCH_FAILED', error }); } }