name
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
//api.jsx
|
||||
const API_BASE = '/api';
|
||||
|
||||
export async function fetchCards() {
|
||||
@@ -27,4 +28,18 @@ export async function updateCardAmount(cardId, setId, rarityId, amount) {
|
||||
|
||||
if (!response.ok) throw new Error('Failed to update amount');
|
||||
return await response.json();
|
||||
}
|
||||
|
||||
export async function fetchDatabaseVersion() {
|
||||
const response = await fetch(`${API_BASE}/db-version`);
|
||||
if (!response.ok) throw new Error('Failed to fetch database version');
|
||||
return await response.json();
|
||||
}
|
||||
|
||||
export async function triggerFullImport() {
|
||||
const response = await fetch(`${API_BASE}/import/full-import`, {
|
||||
method: 'POST'
|
||||
});
|
||||
if (!response.ok) throw new Error('Failed to trigger full import');
|
||||
return await response.json();
|
||||
}
|
||||
Reference in New Issue
Block a user