Skip to content

Commit

Permalink
Merge pull request #193 from starknet-id/fix/expired-quests-are-not-s…
Browse files Browse the repository at this point in the history
…hown-as-expired-on-boost-page

fix: expired quests are not shown as expired on boost page
  • Loading branch information
Th0rgal authored Mar 8, 2024
2 parents 8201585 + 63d63e6 commit a9ea3d1
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/endpoints/quest_boost/get_quests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,20 @@ pub async fn handler(
"input": "$quest_list",
"as": "item",
"in": {
"$mergeObjects": ["$$item"],
"$mergeObjects": ["$$item", doc! {
"expired": {
"$cond": [
{
"$and": [
{ "$gte": ["$$item.expiry", 0] },
{ "$lt": ["$$item.expiry", "$$NOW"] },
]
},
true,
false
]
}
}],
},
}
}
Expand Down

0 comments on commit a9ea3d1

Please sign in to comment.