index : paprika

A blogging platform written in Rust for Cloudflare Workers, integrated with Standard Notes

diff options
context:
space:
mode:
authorPeter Cai <[email protected]>2020-04-15 14:28:28 +0800
committerPeter Cai <[email protected]>2020-04-15 14:28:28 +0800
commit15f78ea6327a7beff12fc29e46ec9dac576adb27 (patch)
tree51f224e9948e43dee2c01df04075c8dda6478fad
parent2064f36b1497ee02a901953b930b681d421c6636 (diff)
downloadpaprika-15f78ea6327a7beff12fc29e46ec9dac576adb27.tar.gz
lib: get rid of the "hello world" endpoint
-rw-r--r--src/lib.rs8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 0546338..a901f5c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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();