Skip to content

Commit

Permalink
'location' -> 'location.pathname' in handleSubmit in PropertyDetail.js
Browse files Browse the repository at this point in the history
  • Loading branch information
sssomeshhh committed May 27, 2024
1 parent b1b4019 commit 5a1a2da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fe/src/components/PropertyDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const PropertyDetail = () => {

const handleSubmit = (e) => {
e.preventDefault();
apiRequest('POST', location, { data: detail, headers: { ...getAuthHeader() } })
apiRequest('POST', location.pathname, { data: detail, headers: { ...getAuthHeader() } })
.then((res) => {
console.log('Property updated!', res.data);
})
Expand Down

0 comments on commit 5a1a2da

Please sign in to comment.