fix: refs #7229 set url #990

Merged
jorgep merged 5 commits from 7229-fixUrl into dev 2024-11-25 13:16:28 +00:00
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ const token = getTokenMultimedia();
export async function downloadFile(id, model = 'dms', urlPath = '/downloadFile', url) {
const appUrl = (await getUrl('', 'lilium')).replace('/#/', '');
const response = await axios.get(
url ?? `${appUrl}/${model}/${id}${urlPath}?access_token=${token}`,
url ?? `${appUrl}/api/${model}/${id}${urlPath}?access_token=${token}`,
{ responseType: 'blob' }
);

View File

@ -29,7 +29,7 @@ describe('downloadFile', () => {
await downloadFile(1);
expect(axios.get).toHaveBeenCalledWith(
`${baseUrl}/dms/1/downloadFile?access_token=${token}`,
`${baseUrl}/api/dms/1/downloadFile?access_token=${token}`,
{ responseType: 'blob' }
);
});