adds a working inventory

This commit is contained in:
2019-08-05 15:41:41 +02:00
parent 894f5f8200
commit 10d157a9af
6 changed files with 2273 additions and 4 deletions

View File

@@ -66,8 +66,10 @@ impl<'q> DbApi<'q> {
Ok(schema::players::table.load::<models::Player>(self.0)?)
}
/// Fetch the inventory of items
///
/// TODO: remove limit used for debug
pub fn fetch_inventory(self) -> QueryResult<Vec<models::Item>> {
Ok(schema::items::table.load::<models::Item>(self.0)?)
Ok(schema::items::table.limit(100).load::<models::Item>(self.0)?)
}
/// Fetch all existing claims
pub fn fetch_claims(self) -> QueryResult<Vec<models::Claim>> {