This commit is contained in:
QkoSad
2024-11-28 14:36:15 +02:00
parent 06ea52ead6
commit fd82786671
12 changed files with 22 additions and 213 deletions
+2 -6
View File
@@ -44,9 +44,7 @@ const LeftSide = ({
useEffect(() => {
async function fetchData() {
const resp = await api.get("/getall", {
params,
});
const resp = await api.get("/getall", { params });
if (resp.data.length) setUsers(resp.data);
}
async function resetData() {
@@ -62,9 +60,7 @@ const LeftSide = ({
const viewProjectHours = (userid: number) => {
async function fetchHours() {
const resp = await api.get("/getuser", {
params: { userid },
});
const resp = await api.get("/getuser", { params: { userid } });
const entriesArray = Object.entries(resp.data);
alert(entriesArray);
}
+1
View File
@@ -2,6 +2,7 @@ import axios from "axios";
const api = axios.create({
baseURL: "http://localhost:5000/api",
timeout: 1000,
headers: {
"Content-Type": "application/json",
},