diff --git a/docs/openapi.yaml b/docs/openapi.yaml index 6832973..6b29f50 100644 --- a/docs/openapi.yaml +++ b/docs/openapi.yaml @@ -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: diff --git a/src/mastodon_api/accounts/types.rs b/src/mastodon_api/accounts/types.rs index 2e75070..a673647 100644 --- a/src/mastodon_api/accounts/types.rs +++ b/src/mastodon_api/accounts/types.rs @@ -336,6 +336,7 @@ pub struct ApiSubscription { pub id: i32, pub sender: Account, pub sender_address: String, + pub expires_at: DateTime, } impl ApiSubscription { @@ -348,6 +349,7 @@ impl ApiSubscription { id: subscription.id, sender, sender_address: subscription.sender_address, + expires_at: subscription.expires_at, } } } diff --git a/src/models/subscriptions/types.rs b/src/models/subscriptions/types.rs index a403ec3..03d70fa 100644 --- a/src/models/subscriptions/types.rs +++ b/src/models/subscriptions/types.rs @@ -23,6 +23,7 @@ pub struct Subscription { pub id: i32, pub sender: DbActorProfile, pub sender_address: String, + pub expires_at: DateTime, } 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, }) } }