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

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

export const createSchema = createAsyncThunk('wooArchive/create/schema',async ()=>{
    try {
        const { data } = await httpService.post("/wooArchive/api/v1/schema")
        return data
    }catch (error) {
        return error.message;
    }
})