From b078afeac856e30f50a561f52a15e40a2f4e1941 Mon Sep 17 00:00:00 2001 From: kaditya97 Date: Fri, 20 Oct 2023 15:05:36 +0545 Subject: [PATCH] fix: unable to access draft and private projects --- frontend/src/api/projects.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/api/projects.js b/frontend/src/api/projects.js index 66163644b8..f9d46564d3 100644 --- a/frontend/src/api/projects.js +++ b/frontend/src/api/projects.js @@ -37,8 +37,10 @@ export const useProjectsQuery = (fullProjectsQuery, action) => { }; export const useProjectQuery = (projectId) => { + const token = useSelector((state) => state.auth.token); + const locale = useSelector((state) => state.preferences['locale']); const fetchProject = ({ signal }) => { - return api().get(`projects/${projectId}/`, { + return api(token, locale).get(`projects/${projectId}/`, { signal, }); };