Skip to content

Conversation

@rupert648
Copy link

This PR adds a "Test" to notifications settings UI which sends a request from the server to the configured ntfy url. It also adds some basic tests for the notifications_worker function to make sure e2e functionality isn't broken.

As mentioned in #659

Pull Request Checklist

  • The Rayhunter team has recently expressed interest in reviewing a PR for this. If not, this PR may be closed due our limited resources and need to prioritize how we spend them.
  • Added or updated any documentation as needed to support the changes in this PR.
  • Code has been linted and run through cargo fmt
  • If any new functionality has been added, unit tests were also added
  • ./CONTRIBUTING.md has been read

- Add POST /api/test-notification endpoint to send test to saved config URL
- Refactor send_notification to return Result instead of bool
- Add NotificationError enum for proper error handling
- Add test notification button in config UI with explanatory text
- Button tests saved configuration URL, not input field value
Copy link
Collaborator

@untitaker untitaker left a comment

Choose a reason for hiding this comment

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

this looks good but should be rebased when #750 lands and the hotfix removed

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