fix paths
This commit is contained in:
parent
7ef2fe757c
commit
1b1b9da9b4
3 changed files with 32 additions and 4 deletions
|
@ -47,8 +47,8 @@
|
|||
>
|
||||
</div>
|
||||
<div class="api-list">
|
||||
<a class="api-item" href="/worlds/1">GET /worlds/{worldID} ▶️</a>
|
||||
<a class="api-item" href="/worlds/all">GET /worlds/all ▶️</a>
|
||||
<a class="api-item" href="/population/1">GET /population/{worldID} ▶️</a>
|
||||
<a class="api-item" href="/population/all">GET /population/all ▶️</a>
|
||||
</div>
|
||||
<p>Results are cached for 3 minutes. Requesting faster is a dumb idea.</p>
|
||||
</main>
|
||||
|
|
|
@ -17,8 +17,9 @@ async fn main() {
|
|||
|
||||
let app = Router::new()
|
||||
.route("/", get(root))
|
||||
.route("/worlds/all", get(get_all_worlds))
|
||||
.route("/worlds/:world", get(get_one_world))
|
||||
.route("/population", get(root))
|
||||
.route("/population/all", get(get_all_worlds))
|
||||
.route("/population/:world", get(get_one_world))
|
||||
.layer(TraceLayer::new_for_http())
|
||||
.with_state(db);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue