Files
universal_is/frontend_reactjs/src/services/RoleService.ts
2024-06-27 17:32:12 +09:00

21 lines
582 B
TypeScript

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