-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
so users can see which achievements they have and haven't unlocked for a service
Here, add a function for_service. It should return a list of AchievementUnlockedPayload for a service.
Lines 87 to 95 in c2e89dd
| impl AchievementUnlockedPayload { | |
| pub async fn for_user( | |
| db: &Database, | |
| user_id: u32, | |
| ) -> Result<Vec<AchievementUnlockedPayload>, AppError> { | |
| let rows = db.achievements().unlocked_for_user(user_id).await?; | |
| Ok(unpack_achievements(rows).collect()) | |
| } | |
| } |
Reactions are currently unavailable