14 lines
335 B
TypeScript
14 lines
335 B
TypeScript
import axiosInstance from "./axiosInstance";
|
|
|
|
export const getAllUsers = async (page: number) => {
|
|
const res = await axiosInstance.get("/api/users", {
|
|
params: { page },
|
|
});
|
|
return res.data;
|
|
};
|
|
|
|
export const getUserById = async (id: number) => {
|
|
const res = await axiosInstance.get(`api/users/${id}`);
|
|
return res.data;
|
|
};
|