mirror of
https://github.com/Dictionarry-Hub/profilarr.git
synced 2026-01-27 05:00:53 +01:00
feat: add manual sync functionality with confirmation modal in ArrModal component
This commit is contained in:
@@ -72,3 +72,18 @@ export const deleteArrConfig = async id => {
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
||||
export const triggerSync = async configId => {
|
||||
try {
|
||||
const response = await fetch(`/api/arr/config/${configId}/sync`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
return await response.json();
|
||||
} catch (error) {
|
||||
console.error('Error triggering sync:', error);
|
||||
return {success: false, error: error.message};
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user