Skip to content

Add get_subscription_age read function (Issue #21) - #765

Merged
orunganiekan merged 3 commits into
SiLioLabs:masterfrom
Demilade10:feat/get-subscription-age
Jul 30, 2026
Merged

Add get_subscription_age read function (Issue #21)#765
orunganiekan merged 3 commits into
SiLioLabs:masterfrom
Demilade10:feat/get-subscription-age

Conversation

@Demilade10

@Demilade10 Demilade10 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Closes #630


Implements Issue #21.

  • Added created_at: u64 to the Subscription struct
  • subscribe() sets created_at on new subscriptions and resubscribes
  • Added get_subscription_age(env, user) -> Option<u64>
  • Bumped schema to v3; migration sets created_at = 0 as sentinel for existing subscriptions
  • Added unit tests covering age calculation, resubscribe reset, no-subscription case, and migrated sentinel case

@drips-wave

drips-wave Bot commented Jul 28, 2026

Copy link
Copy Markdown

@Demilade10 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@orunganiekan
orunganiekan merged commit 1840496 into SiLioLabs:master Jul 30, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

## Issue #21: Add get_subscription_age Read Function

2 participants