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
(cherry picked from commit 7cb3addfb9)
(cherry picked from commit f3ef723269)
mr12.5.1
Debora Crescenzo 9 months ago committed by Crescenzo Debora
parent fee05c830a
commit 730c3fdee3

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

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

Loading…
Cancel
Save