diff --git a/src/api/common.js b/src/api/common.js index 51b90658..d347d496 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -236,10 +236,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) } diff --git a/src/api/user.js b/src/api/user.js index 7b5476c7..9bfafe6d 100644 --- a/src/api/user.js +++ b/src/api/user.js @@ -123,7 +123,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) => {