Fix getUserAchievements to handle missing unlocked_at field
cgen-48f30678b39e43ec8a6fd8e605154254
This commit is contained in:
parent
9f23130777
commit
854ac3b37e
1 changed files with 2 additions and 3 deletions
|
|
@ -282,12 +282,11 @@ export const aethexAchievementService = {
|
|||
.from("user_achievements")
|
||||
.select(
|
||||
`
|
||||
unlocked_at,
|
||||
achievement_id,
|
||||
achievements (*)
|
||||
`,
|
||||
)
|
||||
.eq("user_id", userId)
|
||||
.order("unlocked_at", { ascending: false });
|
||||
.eq("user_id", userId);
|
||||
|
||||
if (error) {
|
||||
console.error("Error fetching user achievements:", error);
|
||||
|
|
|
|||
Loading…
Reference in a new issue