diff --git a/src/data/real-box/real-box.requests.ts b/src/data/real-box/real-box.requests.ts index 4b7aa8c..788e02b 100644 --- a/src/data/real-box/real-box.requests.ts +++ b/src/data/real-box/real-box.requests.ts @@ -31,7 +31,7 @@ export const real_box_requests = { return request.delete('/boxes/delete', { params }); }, async downloadExcel(params: { boxId: number | string }) { - return request.get(`/boxes/download/`, { params }); + return request.get(`/boxes/download/${params.boxId}`); }, async downloadQrCode(params: { boxId: number | string }) { return request.get(`/qr/${params.boxId}`, { responseType: 'blob' }); diff --git a/src/routes/private/real-boxes/DashboardRealBoxesPage.tsx b/src/routes/private/real-boxes/DashboardRealBoxesPage.tsx index 152edaf..5f75960 100644 --- a/src/routes/private/real-boxes/DashboardRealBoxesPage.tsx +++ b/src/routes/private/real-boxes/DashboardRealBoxesPage.tsx @@ -120,7 +120,7 @@ const DashboardRealBoxesPage = (props: Props) => { try { setDownloadIds(p => [...p, id]); const response = await real_box_requests.downloadExcel({ boxId: id }); - const file = new File([response.data], 'Box-excel.xlsx', { type: response.data.type }); + const file = new File([response.data], 'Boxses-excel.xlsx', { type: response.data.type }); file_service.download(file); } catch (error) { notifyUnknownError(error);