2020-03-18 06:33:53 +00:00
|
|
|
import http from '@/api/http';
|
|
|
|
import { rawDataToServerSchedule, Schedule } from '@/api/server/schedules/getServerSchedules';
|
|
|
|
|
|
|
|
export default (uuid: string, schedule: number): Promise<Schedule> => {
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
http.get(`/api/client/servers/${uuid}/schedules/${schedule}`, {
|
|
|
|
params: {
|
2022-06-26 19:13:52 +00:00
|
|
|
include: ['tasks'],
|
2020-03-18 06:33:53 +00:00
|
|
|
},
|
|
|
|
})
|
|
|
|
.then(({ data }) => resolve(rawDataToServerSchedule(data.attributes)))
|
|
|
|
.catch(reject);
|
|
|
|
});
|
|
|
|
};
|