mirror of
https://github.com/serty2005/rmser.git
synced 2026-02-04 19:02:33 -06:00
добавил архив фото, откуда можно удалить и посмотреть
This commit is contained in:
@@ -25,7 +25,8 @@ import type {
|
||||
UnifiedInvoice,
|
||||
ServerUser,
|
||||
UserRole,
|
||||
InvoiceDetails
|
||||
InvoiceDetails,
|
||||
GetPhotosResponse
|
||||
} from './types';
|
||||
|
||||
// Базовый URL
|
||||
@@ -255,4 +256,21 @@ export const api = {
|
||||
syncInvoices: async (): Promise<void> => {
|
||||
await apiClient.post('/invoices/sync');
|
||||
},
|
||||
};
|
||||
getPhotos: async (page = 1, limit = 20): Promise<GetPhotosResponse> => {
|
||||
const { data } = await apiClient.get<GetPhotosResponse>('/photos', {
|
||||
params: { page, limit }
|
||||
});
|
||||
return data;
|
||||
},
|
||||
|
||||
deletePhoto: async (id: string, force = false): Promise<void> => {
|
||||
await apiClient.delete(`/photos/${id}`, {
|
||||
params: { force }
|
||||
});
|
||||
},
|
||||
|
||||
regenerateDraftFromPhoto: async (id: string): Promise<void> => {
|
||||
await apiClient.post(`/photos/${id}/regenerate`);
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user