mirror of
https://github.com/RoboSats/robosats.git
synced 2024-12-13 02:46:28 +00:00
Include created_at
This commit is contained in:
parent
adbaa60da2
commit
6885a24f59
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user