0
0
Fork 0

Merge pull request 'fix: refs #7229 set url' (!990) from 7229-fixUrl into dev

Reviewed-on: verdnatura/salix-front#990
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
Jorge Penadés 2024-11-25 13:16:28 +00:00
commit 8688f2a3aa
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' }
);
});