MT#59078 Disable Primary Acli Creation

Add the query param ?create_primary_acli=false
to PATCH /api/numbers/{id} as default
behaviour.

Change-Id: Ib05602ed7850a19c4a984576fd3645ec158c4b0d
master
Debora Crescenzo 3 weeks ago committed by Crescenzo Debora
parent 4e72e67697
commit 7cb3addfb9

@ -200,10 +200,14 @@ export async function patch (operation, options) {
if (requestConfig.resource !== undefined && requestConfig.resourceId !== undefined) {
path = `api/${requestConfig.resource}/${requestConfig.resourceId}`
}
const config = {
headers: requestConfig.headers,
...(requestConfig.params ? { params: requestConfig.params } : {})
}
try {
return await httpApi.patch(path, [body], {
headers: requestConfig.headers
})
return await httpApi.patch(path, [body], config)
} catch (err) {
handleResponseError(err)
}

@ -134,7 +134,8 @@ export function assignNumber (numberId, subscriberId) {
patchReplace({
path: `api/numbers/${numberId}`,
fieldPath: 'subscriber_id',
value: subscriberId
value: subscriberId,
params: { create_primary_acli: false }
}).then(() => {
resolve()
}).catch((err) => {

Loading…
Cancel
Save