Add expires_at field to object returned by subscribers API endpoint
This commit is contained in:
parent
260e62d51b
commit
2ed8d44001
3 changed files with 8 additions and 0 deletions
|
@ -1076,6 +1076,10 @@ components:
|
|||
description: Sender address.
|
||||
type: string
|
||||
example: '0xd8da6bf...'
|
||||
expires_at:
|
||||
description: The date when subscription expires.
|
||||
type: string
|
||||
format: dateTime
|
||||
Tag:
|
||||
type: object
|
||||
properties:
|
||||
|
|
|
@ -336,6 +336,7 @@ pub struct ApiSubscription {
|
|||
pub id: i32,
|
||||
pub sender: Account,
|
||||
pub sender_address: String,
|
||||
pub expires_at: DateTime<Utc>,
|
||||
}
|
||||
|
||||
impl ApiSubscription {
|
||||
|
@ -348,6 +349,7 @@ impl ApiSubscription {
|
|||
id: subscription.id,
|
||||
sender,
|
||||
sender_address: subscription.sender_address,
|
||||
expires_at: subscription.expires_at,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ pub struct Subscription {
|
|||
pub id: i32,
|
||||
pub sender: DbActorProfile,
|
||||
pub sender_address: String,
|
||||
pub expires_at: DateTime<Utc>,
|
||||
}
|
||||
|
||||
impl TryFrom<&Row> for Subscription {
|
||||
|
@ -36,6 +37,7 @@ impl TryFrom<&Row> for Subscription {
|
|||
id: db_subscription.id,
|
||||
sender: db_sender,
|
||||
sender_address: db_subscription.sender_address,
|
||||
expires_at: db_subscription.expires_at,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue