21 lines
582 B
TypeScript
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}`)
|
|
// }
|
|
} |