mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-06 09:13:19 +03:00
[PR #451] [MERGED] feat: send email to user when api key expires within 7 days #788
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/pocket-id/pocket-id/pull/451
Author: @kmendell
Created: 4/17/2025
Status: ✅ Merged
Merged: 4/20/2025
Merged by: @kmendell
Base:
main← Head:feat/api-key-email📝 Commits (10+)
6131e18feat: add api key expiration email0a119dcremove un-needed loggingf885804make sure name is included in email42c6fccrun first api key job async3ea21bfadd expiration_email_sent database column to eliminate duplicate emailsc9622a2Merge branch 'main' into feat/api-key-email77cd16dUpdate backend/resources/email-templates/api-key-expiring-soon_text.tmpl9b4eeb6Update backend/resources/email-templates/api-key-expiring-soon_html.tmplcb6f1d0remove run on start74b1d5cuse datatype.DateTime instead of unix timestamps📊 Changes
14 files changed (+164 additions, -18 deletions)
View changed files
📝
backend/internal/bootstrap/router_bootstrap.go(+2 -1)📝
backend/internal/dto/api_key_dto.go(+7 -6)➕
backend/internal/job/api_key_expiry_job.go(+49 -0)📝
backend/internal/model/api_key.go(+6 -5)📝
backend/internal/service/api_key_service.go(+49 -3)📝
backend/internal/service/audit_log_service.go(+1 -1)📝
backend/internal/service/email_service_templates.go(+14 -1)📝
backend/internal/service/user_service.go(+1 -1)➕
backend/resources/email-templates/api-key-expiring-soon_html.tmpl(+17 -0)➕
backend/resources/email-templates/api-key-expiring-soon_text.tmpl(+10 -0)➕
backend/resources/migrations/postgres/20250417120000_add_expiration_email_sent_to_api_keys.down.sql(+2 -0)➕
backend/resources/migrations/postgres/20250417120000_add_expiration_email_sent_to_api_keys.up.sql(+2 -0)➕
backend/resources/migrations/sqlite/20250417120000_add_expiration_email_sent_to_api_keys.down.sql(+2 -0)➕
backend/resources/migrations/sqlite/20250417120000_add_expiration_email_sent_to_api_keys.up.sql(+2 -0)📄 Description
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.