Add ability to trigger a save from the ui which whill make the trainer save on the next step
This commit is contained in:
@@ -50,6 +50,22 @@ export const deleteJob = (jobID: string) => {
|
||||
});
|
||||
};
|
||||
|
||||
export const saveJobNow = (jobID: string) => {
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
apiClient
|
||||
.get(`/api/jobs/${jobID}/save_now`)
|
||||
.then(res => res.data)
|
||||
.then(data => {
|
||||
console.log('Job set to save on next step:', data);
|
||||
resolve();
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error setting job to save on next step:', error);
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
export const markJobAsStopped = (jobID: string) => {
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
apiClient
|
||||
|
||||
Reference in New Issue
Block a user