Add exclusive lists (#22048)
Co-authored-by: Liam Cooke <liam@liamcooke.com> Co-authored-by: John Holdun <john@johnholdun.com> Co-authored-by: Effy Elden <effy@effy.space> Co-authored-by: Lina Reyne <git@lina.pizza> Co-authored-by: Lina <20880695+necropolina@users.noreply.github.com> Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
0daf78f903
commit
bacb674921
11 changed files with 86 additions and 17 deletions
|
@ -151,10 +151,10 @@ export const createListFail = error => ({
|
|||
error,
|
||||
});
|
||||
|
||||
export const updateList = (id, title, shouldReset, replies_policy) => (dispatch, getState) => {
|
||||
export const updateList = (id, title, shouldReset, isExclusive, replies_policy) => (dispatch, getState) => {
|
||||
dispatch(updateListRequest(id));
|
||||
|
||||
api(getState).put(`/api/v1/lists/${id}`, { title, replies_policy }).then(({ data }) => {
|
||||
api(getState).put(`/api/v1/lists/${id}`, { title, replies_policy, exclusive: typeof isExclusive === 'undefined' ? undefined : !!isExclusive }).then(({ data }) => {
|
||||
dispatch(updateListSuccess(data));
|
||||
|
||||
if (shouldReset) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue