Create list effects command #412

Merged
Vylpes merged 15 commits from feature/379-list-effects into develop 2024-12-07 22:32:20 +00:00
Showing only changes of commit 96bbd3b28a - Show all commits

View file

@ -63,13 +63,14 @@ export default class UserEffect extends AppBaseEntity {
const repository = AppDataSource.getRepository(UserEffect);
const all = await repository.find({
where: { UserId: userId },
order: { Name: "ASC" },
skip: page * itemsPerPage,
take: itemsPerPage,
});
const query = await repository.createQueryBuilder("effect")
.where("effect.UserId = :userId", { userId })
.where("effect.Unused > 0")
.orderBy("effect.Name", "ASC")
.skip(page * itemsPerPage)
.take(itemsPerPage)
.getMany();
return all;
return query;
}
}