mirror of
https://github.com/plankanban/planka.git
synced 2025-08-05 05:25:29 +02:00
Background gradients, migrate from CSS to SCSS, remove !important
This commit is contained in:
parent
8534ed292c
commit
5bfff3865f
312 changed files with 4295 additions and 2989 deletions
30
client/src/sagas/core/requests/users.js
Normal file
30
client/src/sagas/core/requests/users.js
Normal file
|
@ -0,0 +1,30 @@
|
|||
import { call, put } from 'redux-saga/effects';
|
||||
|
||||
import request from './request';
|
||||
import { fetchUsersFailed, fetchUsersRequested, fetchUsersSucceeded } from '../../../actions';
|
||||
import api from '../../../api';
|
||||
|
||||
// eslint-disable-next-line import/prefer-default-export
|
||||
export function* fetchUsersRequest() {
|
||||
yield put(fetchUsersRequested());
|
||||
|
||||
try {
|
||||
const { items } = yield call(request, api.getUsers);
|
||||
|
||||
const action = fetchUsersSucceeded(items);
|
||||
yield put(action);
|
||||
|
||||
return {
|
||||
success: true,
|
||||
payload: action.payload,
|
||||
};
|
||||
} catch (error) {
|
||||
const action = fetchUsersFailed(error);
|
||||
yield put(action);
|
||||
|
||||
return {
|
||||
success: false,
|
||||
payload: action.payload,
|
||||
};
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue