Skip to content

Commit

Permalink
fix: unable to access draft and private projects
Browse files Browse the repository at this point in the history
  • Loading branch information
kaditya97 committed Oct 20, 2023
1 parent 5b895a4 commit b078afe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/src/api/projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
};
Expand Down

0 comments on commit b078afe

Please sign in to comment.