Add basic UI to set list replies setting in glitch-soc

This commit is contained in:
Thibaut Girka
2018-11-04 13:00:59 +01:00
committed by ThibG
parent 06c7fb8015
commit f17a61a916
2 changed files with 22 additions and 4 deletions

View File

@ -148,10 +148,10 @@ export const createListFail = error => ({
error,
});
export const updateList = (id, title, shouldReset) => (dispatch, getState) => {
export const updateList = (id, title, shouldReset, replies_policy) => (dispatch, getState) => {
dispatch(updateListRequest(id));
api(getState).put(`/api/v1/lists/${id}`, { title }).then(({ data }) => {
api(getState).put(`/api/v1/lists/${id}`, { title, replies_policy }).then(({ data }) => {
dispatch(updateListSuccess(data));
if (shouldReset) {