summaryrefslogtreecommitdiff
path: root/src/api/pages.rs
diff options
context:
space:
mode:
authorTyler Murphy <tylermurphy534@gmail.com>2023-01-28 14:22:29 -0500
committerTyler Murphy <tylermurphy534@gmail.com>2023-01-28 14:22:29 -0500
commit7e07687b5ec14bd788b8d2dd3f0a7ead83842fd4 (patch)
tree795df5d4e91e44e50214437dc0c77f25db66b870 /src/api/pages.rs
parentdocker (diff)
downloadxssbook-7e07687b5ec14bd788b8d2dd3f0a7ead83842fd4.tar.gz
xssbook-7e07687b5ec14bd788b8d2dd3f0a7ead83842fd4.tar.bz2
xssbook-7e07687b5ec14bd788b8d2dd3f0a7ead83842fd4.zip
clippy my beloved
Diffstat (limited to 'src/api/pages.rs')
-rw-r--r--src/api/pages.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/api/pages.rs b/src/api/pages.rs
index 7f5bfc3..f4f0f42 100644
--- a/src/api/pages.rs
+++ b/src/api/pages.rs
@@ -4,41 +4,41 @@ use crate::{types::{extract::AuthorizedUser, response::ResponseCode}, console};
async fn root(user: Option<AuthorizedUser>) -> Response {
if user.is_some() {
- return Redirect::to("/home").into_response()
+ Redirect::to("/home").into_response()
} else {
- return Redirect::to("/login").into_response()
+ Redirect::to("/login").into_response()
}
}
async fn login(user: Option<AuthorizedUser>) -> Response {
if user.is_some() {
- return Redirect::to("/home").into_response()
+ Redirect::to("/home").into_response()
} else {
- return ResponseCode::Success.file("/login.html").await
+ ResponseCode::Success.file("/login.html").await
}
}
async fn home(user: Option<AuthorizedUser>) -> Response {
if user.is_none() {
- return Redirect::to("/login").into_response()
+ Redirect::to("/login").into_response()
} else {
- return ResponseCode::Success.file("/home.html").await
+ ResponseCode::Success.file("/home.html").await
}
}
async fn people(user: Option<AuthorizedUser>) -> Response {
if user.is_none() {
- return Redirect::to("/login").into_response()
+ Redirect::to("/login").into_response()
} else {
- return ResponseCode::Success.file("/people.html").await
+ ResponseCode::Success.file("/people.html").await
}
}
async fn profile(user: Option<AuthorizedUser>) -> Response {
if user.is_none() {
- return Redirect::to("/login").into_response()
+ Redirect::to("/login").into_response()
} else {
- return ResponseCode::Success.file("/profile.html").await
+ ResponseCode::Success.file("/profile.html").await
}
}