Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 1x 1x | import { httpClient } from '@/shared/lib'
import { forceDownload } from '@/shared/helpers'
import { CHANGE_LOG_EXPORT_TARGET } from './constants'
import { EXCEL_ACCEPT } from '@/shared/config'
export const downloadChangeLogXLSX = async (filters?: Record<string, unknown>) => {
const response = await httpClient<Blob>({
url: CHANGE_LOG_EXPORT_TARGET,
responseType: 'blob',
headers: {
Accept: EXCEL_ACCEPT,
},
params: filters,
}).then(res => {
return res.data
})
forceDownload(window.URL.createObjectURL(response), `${new Date().toTimeString()}.xlsx`).then(url =>
window.URL.revokeObjectURL(url)
)
}
|