refresh signed files

This commit is contained in:
m
2026-07-11 23:09:35 +02:00
parent f7cf2a2bef
commit b6e38e930c
5 changed files with 72 additions and 31 deletions
+5 -1
View File
@@ -1,4 +1,4 @@
import { API_BASE_URL } from '../constants/api';
import { API_BASE_URL, ENDPOINTS } from '../constants/api';
import { ApiError } from '../types';
class ApiClient {
@@ -43,6 +43,10 @@ class ApiClient {
async delete<T>(endpoint: string): Promise<T> {
return this.request<T>(endpoint, { method: 'DELETE' });
}
async getFileUrl(fileName: string): Promise<{ data: { url: string; name: string } }> {
return this.request(`${ENDPOINTS.FILE}/${fileName}`);
}
}
export const apiClient = new ApiClient(API_BASE_URL);