DashboardLayout changes, refactoring, useSWR

This commit is contained in:
cracklesparkle
2024-06-27 17:32:12 +09:00
parent 18fb120777
commit c41e59cd86
19 changed files with 1309 additions and 294 deletions

View File

@ -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}`)
// }
}