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/communication.js

19 lines
506 B

import _ from 'lodash'
import { post } from 'src/api/common'
export async function createFax (options) {
const formData = new FormData()
const fields = _.clone(options)
delete fields.faxfile
const json = JSON.stringify(fields)
formData.append('json', json)
if (options.faxfile) {
formData.append('faxfile', options.faxfile)
}
return await post({
resource: 'faxes',
headers: { 'Content-Type': 'multipart/form-data' },
body: formData
})
}