lib: get rid of the "hello world" endpoint

This commit is contained in:
Peter Cai 2020-04-15 14:28:28 +08:00
parent 2064f36b14
commit 15f78ea632
No known key found for this signature in database
GPG Key ID: 71F5FB4E4F3FD54F
1 changed files with 0 additions and 8 deletions

View File

@ -51,7 +51,6 @@ lazy_static! {
fn build_routes() -> router::Router {
let mut router = router::Router::new(&default_route);
router.add_route("/hello", &hello_world);
router.add_route(blog::IMG_CACHE_PREFIX, &proxy_remote_image);
sn::build_routes(&mut router);
render::build_routes(&mut router);
@ -184,13 +183,6 @@ async fn default_route(_req: Request, url: Url) -> MyResult<Response> {
Err(Error::NotFound("This page is not available".into()))
}
async fn hello_world(_req: Request, _url: Url) -> MyResult<Response> {
Response::new_with_opt_str_and_init(
Some("Hello, world from Rust"),
ResponseInit::new().status(200)
).internal_err()
}
#[wasm_bindgen]
pub async fn handle_request_rs(req: Request) -> Response {
let url = Url::new(&req.url()).unwrap();