Skip to content

Commit

Permalink
route change
Browse files Browse the repository at this point in the history
  • Loading branch information
lsylcy0307 committed Apr 29, 2024
1 parent 772d312 commit 7221f32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions client/src/DonationInfo/DonationInfoPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ function DonationInfoPage() {
const res = await axios.get(
`http://localhost:4000/api/donor/${donation.data.donor_id}`,
);
console.log(res.data);
setDonorName(res.data.contact_name);
setDonator(res.data);
} catch (error) {
Expand Down Expand Up @@ -169,6 +170,7 @@ function DonationInfoPage() {

useEffect(() => {
if (donationData) {

const updatedCustomRows = [
{
label: 'Donation Amount',
Expand Down
4 changes: 2 additions & 2 deletions server/src/routes/donor.route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ const router = express.Router();

router.get('/all', getAllDonorsController);

router.get('type/:type', isAuthenticated, getAllDonorsOfType);
router.get('/:id', isAuthenticated, getDonorByIdController);

router.get('/id/:id', isAuthenticated, getDonorByIdController);
router.get('type/:type', isAuthenticated, getAllDonorsOfType);

router.post('/create', isAuthenticated, createDonorController);

Expand Down

0 comments on commit 7221f32

Please sign in to comment.