diff options
author | Tyler Murphy <tylermurphy534@gmail.com> | 2023-01-28 02:51:34 -0500 |
---|---|---|
committer | Tyler Murphy <tylermurphy534@gmail.com> | 2023-01-28 02:51:34 -0500 |
commit | c01b8b8c90fa762f25bf52437611643e3ca16e5a (patch) | |
tree | c93293c5c074a03808cdd4b85cdf6001f2f17dd6 /src/api/pages.rs | |
parent | rusty boio finished (diff) | |
download | xssbook-c01b8b8c90fa762f25bf52437611643e3ca16e5a.tar.gz xssbook-c01b8b8c90fa762f25bf52437611643e3ca16e5a.tar.bz2 xssbook-c01b8b8c90fa762f25bf52437611643e3ca16e5a.zip |
fix rerendering logout button, console page
Diffstat (limited to 'src/api/pages.rs')
-rw-r--r-- | src/api/pages.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/api/pages.rs b/src/api/pages.rs index 4701795..b2bef82 100644 --- a/src/api/pages.rs +++ b/src/api/pages.rs @@ -1,6 +1,6 @@ use axum::{Router, response::{Response, Redirect, IntoResponse}, routing::get}; -use crate::types::{extract::AuthorizedUser, response::ResponseCode}; +use crate::{types::{extract::AuthorizedUser, response::ResponseCode}, console}; async fn root(user: Option<AuthorizedUser>) -> Response { if user.is_some() { @@ -42,8 +42,12 @@ async fn profile(user: Option<AuthorizedUser>) -> Response { } } +async fn console() -> Response { + console::generate().await +} + async fn wordpress() -> Response { - ResponseCode::ImATeapot.msg("Hello i am a teapot owo") + ResponseCode::ImATeapot.text("Hello i am a teapot owo") } pub fn router() -> Router { @@ -53,5 +57,6 @@ pub fn router() -> Router { .route("/home", get(home)) .route("/people", get(people)) .route("/profile", get(profile)) + .route("/console", get(console)) .route("/wp-admin", get(wordpress)) }
\ No newline at end of file |