diff --git a/src/db/shop_proxy.rs b/src/db/shop_proxy.rs index 291d937..66454e8 100644 --- a/src/db/shop_proxy.rs +++ b/src/db/shop_proxy.rs @@ -51,6 +51,7 @@ pub async fn get_paginated_items( ItemSortEnum::Name => a.core_item.name.cmp(&b.core_item.name), ItemSortEnum::Level => a.core_item.level.cmp(&b.core_item.level), ItemSortEnum::Type => a.core_item.item_type.cmp(&b.core_item.item_type), + ItemSortEnum::Rarity => a.core_item.rarity.cmp(&b.core_item.rarity), }; match pagination .shop_sort_data diff --git a/src/models/shop_structs.rs b/src/models/shop_structs.rs index de3592d..17ebf2a 100644 --- a/src/models/shop_structs.rs +++ b/src/models/shop_structs.rs @@ -52,6 +52,8 @@ pub enum ItemSortEnum { Level, #[serde(alias = "type", alias = "TYPE")] Type, + #[serde(alias = "rarity", alias = "RARITY")] + Rarity, } #[derive(Serialize, Deserialize, IntoParams, Validate, Eq, PartialEq, Hash, Default)]