import axios from "axios";

const baseUrl = "/api/security-management"
export class FunctionService {
    create(data) {
        return axios({
            baseURL: baseUrl,
            url: "/functions",
            method:"POST",
            data:data
        })
    }

    show(id) {
        return axios({
            baseURL:baseUrl,
            url:"/functions/"+id,
            method:"get"
        })
    }

    update(id,data) {
        return axios({
            baseURL:baseUrl,
            url:"/functions/"+id,
            method:"patch",
            data:data
        })
    }

    delete(data) {
        return axios({
            baseURL:baseUrl,
            url:"/functions/remove",
            method:"post",
            data:data
        })
    }

    getSelection(){
        return axios({
            baseURL:baseUrl,
            url:"/selections/function-module"
        })
    }
}