Skip to content

Commit

Permalink
Merge pull request #67 from ChangePlusPlusVandy/serious-bug-fix
Browse files Browse the repository at this point in the history
Serious bug fix
  • Loading branch information
JiashuHarryHuang authored Apr 16, 2024
2 parents 53eacd2 + 5d4db21 commit 1a52c97
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pages/api/volunteer-logs/approved.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default async function handler(
.populate({ path: 'event' })
.exec()) as QueriedVolunteerLogDTO[];

res.status(200).json(logs);
return res.status(200).json(logs);
} catch (e) {
console.error('An error has occurred in index.ts', e);
res.status(500).json({
Expand All @@ -43,7 +43,7 @@ export default async function handler(
{ status: 'approved' }
);

res.status(200).json({
return res.status(200).json({
message: 'The hours have been approved!',
status: 'success',
});
Expand Down
2 changes: 1 addition & 1 deletion pages/api/volunteer-logs/pending.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default async function handler(
.populate({ path: 'event' })
.exec()) as QueriedVolunteerLogDTO[];

res.status(200).json(logs);
return res.status(200).json(logs);
} catch (e) {
console.error('An error has occurred in index.ts', e);
res.status(500).json({
Expand Down
4 changes: 2 additions & 2 deletions pages/api/volunteer-logs/rejected.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default async function handler(
.populate({ path: 'event' })
.exec()) as QueriedVolunteerLogDTO[];

res.status(200).json(logs);
return res.status(200).json(logs);
} catch (e) {
console.error('An error has occurred in index.ts', e);
res.status(500).json({
Expand All @@ -44,7 +44,7 @@ export default async function handler(
{ status: 'rejected' }
);

res.status(200).json({
return res.status(200).json({
message: 'The hours have been rejected!',
status: 'success',
});
Expand Down

0 comments on commit 1a52c97

Please sign in to comment.