From eebb8594de55d881fb8a6e759cf1fe62fac248fe Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Fri, 10 Apr 2020 12:53:19 +0300 Subject: [PATCH] Print the users name from cookie --- project/src/handlers/hello_world.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/src/handlers/hello_world.rs b/project/src/handlers/hello_world.rs index 31f50b8..4c03aeb 100644 --- a/project/src/handlers/hello_world.rs +++ b/project/src/handlers/hello_world.rs @@ -3,5 +3,5 @@ use actix_web::{get, HttpResponse}; #[get("/")] pub fn hello(_user: LoggedUser) -> HttpResponse { - HttpResponse::Ok().json("Hello World!") + HttpResponse::Ok().json(format!("Hello {}!", _user.username)) }