助力箱子, 将生成的箱子返回给客户端
This commit is contained in:
parent
563e12ef0a
commit
030ab5f0ab
@ -113,9 +113,14 @@ class BoxController extends BaseController {
|
|||||||
if (chestsForUser.length === 0) {
|
if (chestsForUser.length === 0) {
|
||||||
const newChest = generateNewChest(uid, user.activity, 1, ChestStatusEnum.LOCKED)
|
const newChest = generateNewChest(uid, user.activity, 1, ChestStatusEnum.LOCKED)
|
||||||
await newChest.save()
|
await newChest.save()
|
||||||
}
|
return {
|
||||||
return {
|
score: 0,
|
||||||
score,
|
chests: [newChest.toJson()],
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return {
|
||||||
|
score: 0,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user