{"size": 774, "ext": "js", "max_stars_repo_path": "src/Api/user.js", "max_stars_repo_name": "AsifAhsan4980/adan-dashboard", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/Api/user.js", "max_issues_repo_name": "AsifAhsan4980/adan-dashboard", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/Api/user.js", "max_forks_repo_name": "AsifAhsan4980/adan-dashboard", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.8, "max_line_length": 87, "alphanum_fraction": 0.5594315245}
import axios from "axios";


export const getAllUser = (token) => {
    return axios.get("http://localhost:3001/admin/user/all_user",{

        headers:{
            "Content-Type":"application/json",
            "Authorization":`Bearer ${token}`
        }
    })
}

export const deleteUser = (token,id) => {
    return axios.delete(`http://localhost:3001/admin/user/${id}`,{
        headers:{
            "Content-Type":"application/json",
            "Authorization":`Bearer ${token}`
        }
    })
}

export const updateUserRole = (token,role) => {
    return axios.put(`http://localhost:3001/admin/user/roleUpdate/${role._id}`, role, {
        headers: {
            "Content-Type": "application/json",
            "Authorization":`Bearer ${token}`
        }
    })
}