refresh signed files
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user