Skip to content

[SSF 220] - Auth Gating Controllers#185

Merged
dburkhart07 merged 9 commits into
mainfrom
ddb/SSF-220-auth-gating-backend
Jun 14, 2026
Merged

[SSF 220] - Auth Gating Controllers#185
dburkhart07 merged 9 commits into
mainfrom
ddb/SSF-220-auth-gating-backend

Conversation

@dburkhart07

Copy link
Copy Markdown

ℹ️ Issue

Closes #220

📝 Description

For this PR, I added proper Role and Auth gating for all endpoints according to how they are used within the apiClient and frontend. I forgot to branch it off of #177 but any endpoint that was not auth-gated was because it is deleted in there, or did not need to be.

Additionally, I also standardized some of our backend controller formats, as we had a few endpoints that called the user's id and some attribute (e.g. /:pantryId/orders in pantry controller), and replaced it to be /me, since that format is much simpler and does not require an additional gating query.

Finally, I removed a few unused frontend files and the apiClient functions used in those files, since they were then deprecated.

✔️ Verification

Verified all routes worked and all tests still passed.

🏕️ (Optional) Future Work / Notes

N/A

@Yurika-Kan Yurika-Kan self-assigned this May 29, 2026
@Yurika-Kan Yurika-Kan self-requested a review May 31, 2026 09:49
@jxuistrying jxuistrying self-requested a review May 31, 2026 19:56

@Yurika-Kan Yurika-Kan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are awesome cleanly implemented resolvers!
and /me simplifies so much for devs :)

found a bug & a small typo to look at~

Comment thread apps/backend/src/orders/order.controller.ts
Comment thread apps/backend/src/donations/donations.controller.ts Outdated
@dburkhart07 dburkhart07 requested a review from Yurika-Kan June 8, 2026 07:38

@Yurika-Kan Yurika-Kan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one last thing to add & it's good to go! :) AYYY

Comment thread apps/backend/src/orders/order.controller.ts
@dburkhart07 dburkhart07 requested a review from Yurika-Kan June 11, 2026 04:32

@jxuistrying jxuistrying left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested auth gating on pantry controller endpoints and donations controller endpoints using postman. LGTM!

@Yurika-Kan Yurika-Kan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM~

@dburkhart07 dburkhart07 merged commit 2661d18 into main Jun 14, 2026
4 checks passed
@dburkhart07 dburkhart07 deleted the ddb/SSF-220-auth-gating-backend branch June 14, 2026 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants