use actix_web::{web, HttpResponse, Responder};
use crate::rubase::ruresult;
use crate::rulog::ru_log;
pub async fn manual_hello() -> impl Responder {
ru_log::info("manual_hello there" );
HttpResponse::Ok().body("manual_hello there!")
}
pub async fn home() -> impl Responder {
ru_log::info2("home", ruresult::find_bean_ru_result().unwrap() );
HttpResponse::Ok().content_type("application/json; charset=utf-8")
.json( ruresult::find_bean_ru_result().unwrap() )
}
pub fn config_routes(cfg: &mut web::ServiceConfig) {
cfg.route("/hey", web::get().to(manual_hello));
}