This commit is contained in:
2025-05-25 17:41:07 +02:00
parent 9962dc1e55
commit eb1ebc3464
2 changed files with 87 additions and 3 deletions

View File

@@ -0,0 +1,13 @@
import axios from "axios";
const API_URL = "https://testowe.zikor.pl/api/v1";
export async function getUserById(userId) {
try {
const response = await axios.get(`${API_URL}/clients/get/${userId}`);
return response.data;
} catch (err) {
console.error(`Nie udało się pobrać danych użytkownika o ID ${userId}.`, err.response.status);
throw err;
}
}