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

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

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