Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/added withcredential to include cookies on organization list api #1137

Merged
merged 2 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading