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:
parent
af4297ac62
commit
3bb68b0d4f
67 changed files with 774 additions and 210 deletions
|
@ -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));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue