Skip to content

Commit

Permalink
Merge pull request #6089 from hotosm/hotfix/access-draft-private-proj…
Browse files Browse the repository at this point in the history
…ects

fix: unable to access draft and private projects
  • Loading branch information
ramyaragupathy committed Oct 20, 2023
2 parents 216ef04 + b078afe commit 43c6a63
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 43c6a63

Please sign in to comment.