You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ngcp-csc-ui/src/api/pbx-auto-attendants.js

20 lines
564 B

import { httpApi, patchReplaceFull } from 'src/api/common'
export async function getAutoAttendants (options) {
const params = { ...options, ...{ expand: 'all' } }
const res = await httpApi.get('api/autoattendants/', {
params
})
return res.data.total_count > 0 ? res.data : []
}
export async function editSubscriberSlots (options) {
const res = await patchReplaceFull({
resource: 'autoattendants',
resourceId: options.subscriberId,
fieldPath: 'slots',
value: options.slots
})
return res.slots
}