Skip to content

Commit

Permalink
Merge pull request #1137 from hotosm/feat-organization-cookie
Browse files Browse the repository at this point in the history
feature/added withcredential to include cookies on organization list api
  • Loading branch information
varun2948 authored Jan 25, 2024
2 parents c42af08 + fbcbca1 commit bb8b2ce
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions src/backend/app/projects/project_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,10 @@ async def update_project_form(
contents = await form.read()

form_updated = await project_crud.update_project_form(
db, project_id, contents, file_ext[1:] # Form Contents # File type
db,
project_id,
contents,
file_ext[1:], # Form Contents # File type
)

return form_updated
Expand Down Expand Up @@ -904,7 +907,10 @@ async def update_project_category(

# Update odk forms
await project_crud.update_project_form(
db, project_id, file_ext[1:] if upload else "xls", upload # Form
db,
project_id,
file_ext[1:] if upload else "xls",
upload, # Form
)

return JSONResponse(status_code=200, content={"success": True})
Expand Down Expand Up @@ -1157,7 +1163,7 @@ async def get_task_status(
async def get_template_file(
file_type: str = Query(
..., enum=["data_extracts", "form"], description="Choose file type"
)
),
):
"""Get template file.
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/api/OrganisationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const OrganisationDataService: Function = (url: string) => {
dispatch(OrganisationAction.GetOrganisationDataLoading(true));
const getOrganisationData = async (url) => {
try {
const getOrganisationDataResponse = await axios.get(url);
const getOrganisationDataResponse = await axios.get(url, { withCredentials: 'true' });
const response: GetOrganisationDataModel = getOrganisationDataResponse.data;
dispatch(OrganisationAction.GetOrganisationsData(response));
} catch (error) {
Expand Down

0 comments on commit bb8b2ce

Please sign in to comment.