feat: make index api route redirect to home page
parent
ad92655eab
commit
38751f3e1e
@ -1,11 +1,10 @@
|
||||
use rapid_web::actix::HttpResponse;
|
||||
use rapid_web::{ rapid_web_codegen::rapid_handler, welcome_view };
|
||||
use rapid_web::actix::web::Redirect;
|
||||
use rapid_web::actix::Responder;
|
||||
use rapid_web::rapid_web_codegen::rapid_handler;
|
||||
|
||||
pub const ROUTE_KEY: &str = "index";
|
||||
|
||||
#[rapid_handler]
|
||||
pub async fn query() -> HttpResponse {
|
||||
HttpResponse::Ok()
|
||||
.content_type("text/html; charset=utf-8")
|
||||
.body(welcome_view)
|
||||
pub async fn query() -> impl Responder {
|
||||
Redirect::to("http://localhost:3000/").permanent()
|
||||
}
|
||||
|
Loading…
Reference in New Issue