refactor: use apiUrl

This commit is contained in:
karishmas6
2024-11-01 08:25:14 +05:30
parent bb38786027
commit ba9e046576
6 changed files with 36 additions and 30 deletions

View File

@@ -1,8 +1,9 @@
import { default as axios } from "axios";
import { apiUrl } from "../apiConfig"
export const getUserById = async (userId: string) => {
try {
const response = await axios.get(`http://localhost:8080/auth/user/${userId}`);
const response = await axios.get(`${apiUrl}/auth/user/${userId}`);
if (response.status === 200) {
return response.data;
} else {