Skip to content

Instantly share code, notes, and snippets.

@ashleygwilliams
Last active November 29, 2017 16:02
Show Gist options
  • Save ashleygwilliams/411df6650642e4451532e8b74c3c54b8 to your computer and use it in GitHub Desktop.
Save ashleygwilliams/411df6650642e4451532e8b74c3c54b8 to your computer and use it in GitHub Desktop.
#[get("/<pkgname>", format = "application/vnd.knork+json")]
fn readme_latest_knork(pkgname: String) -> String {
readme_latest(pkgname)
}
#[get("/<pkgname>")]
fn readme_latest(pkgname: String) -> String {
numbat::emitter().emit_name("readme-latest");
npm_readme_client::fetch_latest(pkgname).unwrap()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment