MT#64432 Fix typo

* Fix missing subscriber_id parameter in setSharedValue()
* rename "options" to "data" for consistency

Change-Id: Ice57d3cb4a2318055c574ea9169a9cf49b9561c5
(cherry picked from commit df136f71aa)
mr14.1
Debora Crescenzo 4 months ago committed by Crescenzo Debora
parent dead98bd1b
commit c2e3179bde

@ -32,16 +32,16 @@ export async function getEntryById (subscriberId, id) {
}) })
} }
export async function getPhonebook (options) { export async function getPhonebook (data) {
return getList({ return getList({
path: `api/v2/subscribers/${options.subscriber_id}/phonebook`, path: `api/v2/subscribers/${data.subscriber_id}/phonebook`,
params: options params: data
}) })
} }
export function setSharedValue (subscriberId, phonebookId, value) { export function setSharedValue (data, value) {
return patchReplace({ return patchReplace({
path: `api/v2/subscribers/${subscriberId}/phonebook/${phonebookId}`, path: `api/v2/subscribers/${data.subscriber_id}/phonebook/${data.id}`,
fieldPath: 'shared', fieldPath: 'shared',
value value
}) })

@ -87,7 +87,7 @@ export default {
async updateSharedValue (context, row) { async updateSharedValue (context, row) {
const newValue = !row.shared const newValue = !row.shared
context.commit('setSharedValue', { id: row.id, value: newValue }) context.commit('setSharedValue', { id: row.id, value: newValue })
await setSharedValue(row.id, newValue) await setSharedValue(row, newValue)
} }
} }
} }

Loading…
Cancel
Save