diff options
| author | Fuwn <[email protected]> | 2022-03-09 01:43:56 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-03-09 01:43:56 -0800 |
| commit | db920aae2a29b1f1e20b6e3998ee62c9e7cca9be (patch) | |
| tree | aa7d7f65f2ff73eead404f345e7c4bc72b7c163f /src/routes.rs | |
| parent | refactor(utils): String to char (diff) | |
| download | api-worker-db920aae2a29b1f1e20b6e3998ee62c9e7cca9be.tar.xz api-worker-db920aae2a29b1f1e20b6e3998ee62c9e7cca9be.zip | |
refactor(routes): get index from file
Diffstat (limited to 'src/routes.rs')
| -rw-r--r-- | src/routes.rs | 42 |
1 files changed, 1 insertions, 41 deletions
diff --git a/src/routes.rs b/src/routes.rs index 7418987..2bade5d 100644 --- a/src/routes.rs +++ b/src/routes.rs @@ -25,47 +25,7 @@ use crate::{ }; pub fn index() -> Result<Response> { - Response::ok( - r#"senpy-club/api-worker -===================== - -routes ------- -if a language requires a parameter, it will be notated like ":this". for -example; if a route is notated as "/v1/route/:parameter", you can access that -route via the url "http://this.domain/v1/route/something". - -- / - - /: index page (you are here) - -- /v2 - - /github: github api mirror - - /languages: a list of all languages that appear in _the_ repository - - /language/:language: get a list of all images that pertain to the language - ":language" - -notes ------ - -contributing -^^^^^^^^^^^^ - -if you'd like to support the project in any way, check out the repository! -<https://github.com/senpy-club/api-worker> - -supporting -^^^^^^^^^^ - -if you would like to support my development ventures, visit my github profile -`here <https://github.com/fuwn>`_. - -license -^^^^^^^ - -`gnu general public license v3.0 (:code:`gpl-3.0-only`) -<https://github.com/senpy-club/api-worker/blob/main/LICENSE>`_"#, - )? - .with_cors(&cors()) + Response::ok(include_str!("index.rst"))?.with_cors(&cors()) } pub async fn github() -> Result<Response> { |