Update dependencies and implement email service integration

- Refactor app and email modules to include email service
- Add tests for user sign-up and mock email service
This commit is contained in:
Greg Burri 2025-05-02 00:57:32 +02:00
parent f31167dd95
commit 3626f8a11b
10 changed files with 291 additions and 151 deletions

View file

@ -0,0 +1,23 @@
use std::sync::Arc;
use recipes::email;
pub struct MockEmailService;
impl MockEmailService {
pub fn create_service() -> Arc<dyn email::EmailServiceTrait> {
Arc::new(Self {})
}
}
#[async_trait::async_trait]
impl email::EmailServiceTrait for MockEmailService {
async fn send_email(
&self,
_email: &str,
_title: &str,
_message: &str,
) -> Result<(), email::Error> {
Ok(())
}
}