diff --git a/src/api/common.js b/src/api/common.js index 96da240a..cee05f9c 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -94,6 +94,7 @@ export async function getList (options) { }, options) if (requestConfig.all === true) { requestConfig.params.rows = LIST_ALL_ROWS + requestConfig.params.page = LIST_DEFAULT_PAGE } if (requestConfig.resource !== undefined) { requestConfig.path = `api/${requestConfig.resource}/` diff --git a/src/store/subscriber-phonebook.js b/src/store/subscriber-phonebook.js index 4d8cf9c8..088c6cfc 100644 --- a/src/store/subscriber-phonebook.js +++ b/src/store/subscriber-phonebook.js @@ -83,8 +83,9 @@ export default { await updateEntry(data) }, async updateSharedValue (context, row) { - context.commit('setSharedValue', { id: row.id, value: !row.shared }) - await setSharedValue(row.subscriber_id, row.id, row.shared) + const newValue = !row.shared + context.commit('setSharedValue', { id: row.id, value: newValue }) + await setSharedValue(row.id, newValue) } } }