Add friendly name and active effect to user effect list embed #422

Merged
Vylpes merged 5 commits from feature/379-2 into develop 2025-02-03 18:24:27 +00:00
Showing only changes of commit 7c17e1d0d0 - Show all commits

View file

@ -63,7 +63,7 @@ export default class UserEffect extends AppBaseEntity {
const query = await repository.createQueryBuilder("effect")
.where("effect.UserId = :userId", { userId })
.where("effect.Unused > 0")
.andWhere("effect.Unused > 0")
.orderBy("effect.Name", "ASC")
.skip(page * itemsPerPage)
.take(itemsPerPage)
@ -77,8 +77,8 @@ export default class UserEffect extends AppBaseEntity {
const query = await repository.createQueryBuilder("effect")
.where("effect.UserId = :userId", { userId })
.where("effect.WhenExpires IS NOT NULL")
.andWhere("effect.WhenExpires > :now", { now: new Date() })
.andWhere("effect.WhenExpires IS NOT NULL")
.andWhere("effect.WhenExpires > :now", { now: new Date() })
.getOne();
return query;