Skip to content

Commit

Permalink
Merge pull request #13 from naxa-developers/hotfix/access-draft-priva…
Browse files Browse the repository at this point in the history
…te-projects

fix: unable to access draft and private projects
  • Loading branch information
kaditya97 authored Oct 20, 2023
2 parents 8b40892 + b078afe commit 10a87b8
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 10a87b8

Please sign in to comment.