DashboardLayout changes, refactoring, useSWR
This commit is contained in:
@ -1,11 +1,21 @@
|
||||
import axiosInstance from "../http/axiosInstance";
|
||||
import { Role, RoleCreate } from "../interfaces/auth";
|
||||
|
||||
export default class RoleService {
|
||||
static async getRoles() {
|
||||
return await axiosInstance.get(`/auth/roles`)
|
||||
}
|
||||
|
||||
static async createRole(data: RoleCreate) {
|
||||
return await axiosInstance.post(`/auth/roles/`, data)
|
||||
}
|
||||
|
||||
|
||||
static async getRoleById(id: number) {
|
||||
return await axiosInstance.get(`/auth/roles/${id}`)
|
||||
}
|
||||
|
||||
// static async deleteRole(id: number) {
|
||||
// return await axiosInstance.delete(`/auth/roles/${id}`)
|
||||
// }
|
||||
}
|
Reference in New Issue
Block a user