diff --git a/README.md b/README.md index f36d759..0e778ef 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,10 @@ sudo apt install pkg-config sudo apt install libssl-dev cargo install sqlx-cli --no-default-features --features rustls,postgres ``` + +## TODO + +- Register form on homepage +- Success message displayed to new subscriber who confirmed his account +- Worker to remove idempotency key from database +- List of subscribers (confirmed and unconfirmed) on admin dashboard diff --git a/configuration/base.yaml b/configuration/base.yaml index 7ec5134..9420ba9 100644 --- a/configuration/base.yaml +++ b/configuration/base.yaml @@ -1,14 +1,6 @@ application: port: 8000 database: - host: "127.0.0.1" - port: 5432 - username: "postgres" - password: "password" database_name: "newsletter" email_client: - base_url: "http://127.0.0.1" - sender_email: "sender@example.com" - authorization_token: "my-secret-token" timeout_milliseconds: 10000 -redis_uri: "redis://127.0.0.1:6379" diff --git a/configuration/local.yaml b/configuration/local.yaml index df4bde1..ae1127d 100644 --- a/configuration/local.yaml +++ b/configuration/local.yaml @@ -2,4 +2,13 @@ application: host: "127.0.0.1" base_url: "http://127.0.0.1:8000" database: + host: "127.0.0.1" + port: 5432 + username: "postgres" + password: "password" require_ssl: false +email_client: + base_url: "https://api.mailersend.com" + sender_email: "MS_PTrumQ@test-r6ke4n1mmzvgon12.mlsender.net" + authorization_token: "secret-token" +redis_uri: "redis://127.0.0.1:6379" diff --git a/src/routes.rs b/src/routes.rs index 772876f..71206e1 100644 --- a/src/routes.rs +++ b/src/routes.rs @@ -2,6 +2,7 @@ mod admin; mod health_check; mod home; mod login; +mod register; mod subscriptions; mod subscriptions_confirm; @@ -9,5 +10,6 @@ pub use admin::*; pub use health_check::*; pub use home::*; pub use login::*; +pub use register::*; pub use subscriptions::*; pub use subscriptions_confirm::*; diff --git a/src/routes/home/home.html b/src/routes/home/home.html index cab76b9..bc14f35 100644 --- a/src/routes/home/home.html +++ b/src/routes/home/home.html @@ -7,6 +7,9 @@
Welcome to our newsletter!
- +