Skip to content

Commit

Permalink
Merge pull request #524 from ertush/hotfix
Browse files Browse the repository at this point in the history
Updated the router push link for approveRejectFacility handler
  • Loading branch information
ertush authored Oct 25, 2024
2 parents 2021549 + 3865049 commit f024920
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ todo.md
/test-results/
/playwright-report/
/playwright/.cache/

# pages
pages/test-fetch.js
7 changes: 4 additions & 3 deletions components/Forms/BasicDetailsForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -563,11 +563,12 @@ export function BasicDeatilsForm({ editMode }) {

if (facilityData) {
fetch(
`${process.env.NEXT_PUBLIC_API_URL}/common/wards/${facilityData?.ward}`,
`${process.env.NEXT_PUBLIC_API_URL}/common/wards/${facilityData?.ward}/`,
{
headers: {
Authorization: 'Bearer ' + options?.token,
Accept: 'application/json',
'Accept': 'application/json',
'Content-Type': 'application/json;charset=UTF-8',
'Authorization': `Bearer ${options?.token}`
}
}
)
Expand Down
3 changes: 2 additions & 1 deletion controllers/facility/approveRejectFacility.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ function approveRejectFacility (facility_id, comment, alert, reject, token, setS
router.push({
pathname: '/facilities',
query: {
to_publish: true,
filter: pending_approval_facilities,
to_publish: false,
closed: false
}
})
Expand Down
10 changes: 10 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,16 @@ const nextConfig = {
},
],
},
// For debug only
{
source: '/test-fetch',
headers: [
{
key: 'Cache-Control',
value: 'no-cache, no-store, max-age=0'
},
],
},

]
}
Expand Down

0 comments on commit f024920

Please sign in to comment.