Skip to content

DEV-612 - Created the get_notifications function#91

Merged
issacli-0821 merged 6 commits intopreviewfrom
DEV-606
Mar 28, 2026
Merged

DEV-612 - Created the get_notifications function#91
issacli-0821 merged 6 commits intopreviewfrom
DEV-606

Conversation

@timothyli1331
Copy link
Copy Markdown

@timothyli1331 timothyli1331 commented Feb 26, 2026

References

Proposed Changes

  • Created the get_notifications function that takes in a user_id and returns a list of all of its notifications

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
help Ready Ready Preview, Comment Mar 28, 2026 8:57pm

Request Review

@issacli-0821 issacli-0821 self-requested a review February 27, 2026 07:59
@HoagieClub HoagieClub deleted a comment from linear bot Feb 27, 2026
@issacli-0821 issacli-0821 changed the title DEV 612 - Created the get_notifications function DEV-612 - Created the get_notifications function Feb 28, 2026
@linear
Copy link
Copy Markdown

linear bot commented Feb 28, 2026

class NotificationView(APIView):
"""Handle collection operations for notifications."""

def get_notifications(self, user_id) -> Response:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This just needs to be a standalone function and not a class

"""Handle collection operations for notifications."""

def get_notifications(self, user_id) -> Response:
"""Get all notifications for a given user."""
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I also updated the urls.py, so now the user_id is not passed in directly. Instead, it can be obtained by doing request.user.id

class NotificationView(APIView):
"""Handle collection operations for notifications."""

def get_notifications(self, user_id) -> Response:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The function should have request as a param

@issacli-0821 issacli-0821 merged commit 670e1dc into preview Mar 28, 2026
2 of 3 checks passed
@issacli-0821 issacli-0821 deleted the DEV-606 branch March 28, 2026 21:01
mar-crespo pushed a commit that referenced this pull request Apr 4, 2026
* Created the get_notifications function

* Made get_notifications into a standalone function and changed to request.user.id

* hopefully this fixes merge conflicts

* Lint notification_views

---------

Co-authored-by: issacli-0821 <tl1719@princeton.edu>
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.

2 participants