item id fix
This commit is contained in:
parent
7de6d6bf7b
commit
5090b85c60
2 changed files with 7 additions and 3 deletions
|
@ -37,7 +37,11 @@ use crate::routes::FallibleApiResponse;
|
|||
pub fn get_items_route(itemdb: &State<ItemDB>, t: Token, c: &State<Config>) -> FallibleApiResponse {
|
||||
check_auth!(t, c);
|
||||
|
||||
let items = itemdb.items();
|
||||
let mut items = Vec::new();
|
||||
for item in itemdb.items() {
|
||||
items.push(itemdb.get_item(&item).unwrap().api_json());
|
||||
}
|
||||
|
||||
Ok(json!({"items": items}))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue