import {createAsyncThunk} from "@reduxjs/toolkit";
import httpService from "./httpService";

export const getSyncSchedule = createAsyncThunk('wooArchive/settings/sync/schedule',async ()=>{
    try {
        const { data } = await httpService.get("/wooArchive/api/v1/settings/sync/schedule")
        return data
    }catch (error) {
        return error.message;
    }
})

export const insertSyncSchedule = createAsyncThunk('wooArchive/insert/settings/sync/schedule',async (settings)=>{
    try {
        const { data } = await httpService.post("/wooArchive/api/v1/settings/sync/schedule",settings)
        return data
    }catch (error) {
        return error.message;
    }
})