add bearer tokens for functions

This commit is contained in:
smanylov
2026-06-02 11:39:54 +07:00
parent 743db57bb3
commit 7d0fb265d4
7 changed files with 42 additions and 19 deletions
+6 -1
View File
@@ -250,9 +250,14 @@ export async function fetchTrackingStats() {
}
export async function downloadTrackingFile(fileId: string, fileName?: string) {
const token = await getSessionData('token');
try {
const response = await fetch(`${API_BASE_URL}/api/v1/files/public-download/${fileId}`, {
method: 'GET'
method: 'GET',
headers: {
'Authorization': `Bearer ${token}`
}
});
if (!response.ok) {