mirror of
https://github.com/RoboSats/robosats.git
synced 2025-07-17 08:13:19 +00:00
Include created_at
This commit is contained in:
@ -494,15 +494,15 @@ class ListNotificationSerializer(serializers.ModelSerializer):
|
|||||||
status = serializers.SerializerMethodField(
|
status = serializers.SerializerMethodField(
|
||||||
help_text="The `status` of the order when the notification was trigered",
|
help_text="The `status` of the order when the notification was trigered",
|
||||||
)
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Notification
|
model = Notification
|
||||||
fields = ("title", "description", "order_id", "status")
|
fields = ("title", "description", "order_id", "status", "created_at")
|
||||||
|
|
||||||
def get_status(self, notification) -> int:
|
def get_status(self, notification) -> int:
|
||||||
return notification.order.status
|
return notification.order.status
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class OrderPublicSerializer(serializers.ModelSerializer):
|
class OrderPublicSerializer(serializers.ModelSerializer):
|
||||||
maker_nick = serializers.CharField(required=False)
|
maker_nick = serializers.CharField(required=False)
|
||||||
maker_hash_id = serializers.CharField(required=False)
|
maker_hash_id = serializers.CharField(required=False)
|
||||||
|
@ -1110,6 +1110,9 @@ components:
|
|||||||
type: integer
|
type: integer
|
||||||
readOnly: true
|
readOnly: true
|
||||||
description: The `status` of the order when the notification was trigered
|
description: The `status` of the order when the notification was trigered
|
||||||
|
created_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
required:
|
required:
|
||||||
- order_id
|
- order_id
|
||||||
- status
|
- status
|
||||||
|
Reference in New Issue
Block a user