mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: notification ordering (#1584)
This commit is contained in:
parent
c72ff782ac
commit
34123681cf
@ -30,7 +30,6 @@ class NotificationViewSet(BaseViewSet):
|
|||||||
|
|
||||||
def list(self, request, slug):
|
def list(self, request, slug):
|
||||||
try:
|
try:
|
||||||
order_by = request.GET.get("order_by", "-created_at")
|
|
||||||
snoozed = request.GET.get("snoozed", "false")
|
snoozed = request.GET.get("snoozed", "false")
|
||||||
archived = request.GET.get("archived", "false")
|
archived = request.GET.get("archived", "false")
|
||||||
read = request.GET.get("read", "true")
|
read = request.GET.get("read", "true")
|
||||||
@ -40,7 +39,7 @@ class NotificationViewSet(BaseViewSet):
|
|||||||
|
|
||||||
notifications = Notification.objects.filter(
|
notifications = Notification.objects.filter(
|
||||||
workspace__slug=slug, receiver_id=request.user.id
|
workspace__slug=slug, receiver_id=request.user.id
|
||||||
).order_by(order_by)
|
).order_by("snoozed_till", "-created_at")
|
||||||
|
|
||||||
# Filter for snoozed notifications
|
# Filter for snoozed notifications
|
||||||
if snoozed == "false":
|
if snoozed == "false":
|
||||||
|
Loading…
Reference in New Issue
Block a user