Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: manually trigger notification #58

Merged
merged 3 commits into from
Mar 13, 2025

Conversation

alfetopito
Copy link
Contributor

Summary

Add a way to manually trigger the notification clean up.
The cronjob has been added for a few days, but the notifications had not been cleaned up.

Since the strapi cloud logs are quite bad to navigate, this should give instant feedback on what's wrong.

Testing

  1. Create a new API token with the permission Notification > cleanup > cleanupExpiredNotifications:
    image
  2. Make POST request containing the header: authorization: bearer <api key>
  • The request should succeed and return the response.

Example of a successful response:

{
    "data": {
        "success": true,
        "deletedCount": 0
    }
}

Example of an error response:

{
    "data": {
        "success": false,
        "error": "This is a test error"
    }
}

@alfetopito alfetopito requested a review from a team March 13, 2025 18:38
@alfetopito alfetopito self-assigned this Mar 13, 2025
@alfetopito alfetopito merged commit 1ce78a8 into main Mar 13, 2025
3 checks passed
@alfetopito alfetopito deleted the feat/manually-trigger-notification branch March 13, 2025 18:40
Copy link
Contributor

@anxolin anxolin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome idea!

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.

2 participants