mirror of
https://github.com/Dictionarry-Hub/profilarr.git
synced 2026-01-22 19:01:02 +01:00
refactor: seperated cloning from settings
This commit is contained in:
@@ -110,16 +110,6 @@ export const getSettings = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
export const saveSettings = async (settings) => {
|
||||
try {
|
||||
const response = await axios.post(`${API_BASE_URL}/settings`, settings);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
console.error('Error saving settings:', error);
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
||||
export const getGitStatus = async () => {
|
||||
try {
|
||||
const response = await axios.get(`${API_BASE_URL}/git/status`);
|
||||
@@ -247,6 +237,16 @@ export const getDiff = async (filePath) => {
|
||||
}
|
||||
};
|
||||
|
||||
export const cloneRepo = async (gitRepo, gitToken) => {
|
||||
try {
|
||||
const response = await axios.post(`${API_BASE_URL}/git/clone`, { gitRepo, gitToken });
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
console.error('Error cloning repository:', error);
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
||||
export const getProfiles = async () => {
|
||||
try {
|
||||
const response = await axios.get(`${API_BASE_URL}/profile`);
|
||||
|
||||
Reference in New Issue
Block a user