1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-19 05:09:43 +02:00

Add project backgrounds

This commit is contained in:
Maksim Eltyshev 2020-05-26 00:46:04 +05:00
parent af4297ac62
commit 3bb68b0d4f
67 changed files with 774 additions and 210 deletions

View file

@ -8,6 +8,9 @@ import {
deleteProjectFailed,
deleteProjectRequested,
deleteProjectSucceeded,
updateProjectBackgroundImageFailed,
updateProjectBackgroundImageRequested,
updateProjectBackgroundImageSucceeded,
updateProjectFailed,
updateProjectRequested,
updateProjectSucceeded,
@ -65,6 +68,30 @@ export function* updateProjectRequest(id, data) {
}
}
export function* updateProjectBackgroundImageRequest(id, data) {
yield put(updateProjectBackgroundImageRequested(id));
try {
const { item } = yield call(request, api.updateProjectBackgroundImage, id, data);
const action = updateProjectBackgroundImageSucceeded(item);
yield put(action);
return {
success: true,
payload: action.payload,
};
} catch (error) {
const action = updateProjectBackgroundImageFailed(id, error);
yield put(action);
return {
success: false,
payload: action.payload,
};
}
}
export function* deleteProjectRequest(id) {
yield put(deleteProjectRequested(id));