From 67753318cd583d368764c79454e9778537ff1b5e Mon Sep 17 00:00:00 2001 From: Justin Chow Date: Thu, 7 Nov 2024 14:01:39 +0700 Subject: [PATCH] fix: fix withauth always refresh --- src/components/hoc/withAuth.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/hoc/withAuth.tsx b/src/components/hoc/withAuth.tsx index a9049ac..98ee460 100644 --- a/src/components/hoc/withAuth.tsx +++ b/src/components/hoc/withAuth.tsx @@ -80,7 +80,7 @@ export default function withAuth( if (!user) { const loadUser = async () => { try { - const res = await api.get>("/users/"); + const res = await api.get>("/users/me"); if (!res.data.data) { toast.error("Sesi login tidak valid");