mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
feat: Move index to /_continuwuity/
This commit is contained in:
@@ -2,13 +2,17 @@ use askama::Template;
|
|||||||
use axum::{
|
use axum::{
|
||||||
Router,
|
Router,
|
||||||
extract::State,
|
extract::State,
|
||||||
response::{Html, IntoResponse},
|
response::{Html, IntoResponse, Redirect},
|
||||||
routing::get,
|
routing::get,
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::WebError;
|
use crate::WebError;
|
||||||
|
|
||||||
pub(crate) fn build() -> Router<crate::State> { Router::new().route("/", get(index_handler)) }
|
pub(crate) fn build() -> Router<crate::State> {
|
||||||
|
Router::new()
|
||||||
|
.route("/", get(async || Redirect::permanent("/_continuwuity/")))
|
||||||
|
.route("/_continuwuity/", get(index_handler))
|
||||||
|
}
|
||||||
|
|
||||||
async fn index_handler(
|
async fn index_handler(
|
||||||
State(services): State<crate::State>,
|
State(services): State<crate::State>,
|
||||||
|
|||||||
Reference in New Issue
Block a user