import axios from "axios"

const baseUrl = "/api/security-management"
export class PermissionService {
    getData(params = {}) {
        return axios({
            baseURL: baseUrl,
            url: "/permissions",
            method: "get",
            params:params
        })
    }

    create(data) {
        return axios({
            baseURL:baseUrl,
            url:"/permissions",
            method:"post",
            data:data
        })
    }

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

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

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