2025-12-17 15:30:27 +01:00

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;
};