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

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

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