summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorTyler Murphy <tylermurphy534@gmail.com>2023-01-29 19:28:48 -0500
committerTyler Murphy <tylermurphy534@gmail.com>2023-01-29 19:28:48 -0500
commitac58a612a3fe928793b77c592551fdd962b69064 (patch)
treec746d9325a88447e3149891a2435bcb1f3ece67a /src/main.rs
parentno mass rerendering html plus logging fix (diff)
downloadxssbook-ac58a612a3fe928793b77c592551fdd962b69064.tar.gz
xssbook-ac58a612a3fe928793b77c592551fdd962b69064.tar.bz2
xssbook-ac58a612a3fe928793b77c592551fdd962b69064.zip
admin page
Diffstat (limited to '')
-rw-r--r--src/main.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 20627d7..b3f5cd2 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -23,6 +23,7 @@ mod api;
mod console;
mod database;
mod types;
+mod admin;
async fn serve<B>(req: Request<B>, next: Next<B>) -> Response
where
@@ -77,6 +78,10 @@ async fn main() {
.layer(middleware::from_fn(serve))
.nest("/", pages::router())
.nest(
+ "/api/admin",
+ api::admin::router().layer(Extension(RouterURI("/admin"))),
+ )
+ .nest(
"/api/auth",
auth::router().layer(Extension(RouterURI("/api/auth"))),
)