diff --git a/src/app.rs b/src/app.rs index 9b537d0..81dcf90 100644 --- a/src/app.rs +++ b/src/app.rs @@ -5,7 +5,7 @@ use std::{net::TcpListener, sync::Arc}; use actix_web::{dev::Server, middleware::Logger, web, App, HttpServer}; use sqlx::{Pool, Postgres}; -use crate::routes::{confirm, health_check, home, publish_newsletter, subscribe}; +use crate::routes::{confirm, health_check, home, login, publish_newsletter, subscribe}; pub struct Application { port: u16, @@ -52,6 +52,7 @@ impl Application { .route("/subscriptions", web::post().to(subscribe)) .route("/confirm", web::get().to(confirm)) .route("/newsletter", web::post().to(publish_newsletter)) + .route("/login", web::get().to(login)) .route("/", web::get().to(home)) .app_data(pool) .app_data(email_service) diff --git a/src/routes/login.rs b/src/routes/login.rs new file mode 100644 index 0000000..bae5bcf --- /dev/null +++ b/src/routes/login.rs @@ -0,0 +1,5 @@ +use actix_web::HttpResponse; + +pub async fn login() -> HttpResponse { + HttpResponse::Ok().finish() +} diff --git a/src/routes/mod.rs b/src/routes/mod.rs index 83d0aa7..4823b16 100644 --- a/src/routes/mod.rs +++ b/src/routes/mod.rs @@ -1,11 +1,13 @@ mod confirm; mod health_check; mod home; +mod login; mod newsletter; mod subscriptions; pub use confirm::*; pub use health_check::*; pub use home::*; +pub use login::*; pub use newsletter::*; pub use subscriptions::*;