Skip to content

Commit

Permalink
Include created_at
Browse files Browse the repository at this point in the history
  • Loading branch information
KoalaSat committed Jul 9, 2024
1 parent adbaa60 commit 6885a24
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,15 +494,15 @@ class ListNotificationSerializer(serializers.ModelSerializer):
status = serializers.SerializerMethodField(
help_text="The `status` of the order when the notification was trigered",
)

class Meta:
model = Notification
fields = ("title", "description", "order_id", "status")
fields = ("title", "description", "order_id", "status", "created_at")

def get_status(self, notification) -> int:
return notification.order.status



class OrderPublicSerializer(serializers.ModelSerializer):
maker_nick = serializers.CharField(required=False)
maker_hash_id = serializers.CharField(required=False)
Expand Down
3 changes: 3 additions & 0 deletions docs/assets/schemas/api-latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1110,6 +1110,9 @@ components:
type: integer
readOnly: true
description: The `status` of the order when the notification was trigered
created_at:
type: string
format: date-time
required:
- order_id
- status
Expand Down

0 comments on commit 6885a24

Please sign in to comment.