feat: return more metadata for display

This commit is contained in:
Methapon2001 2024-03-21 13:30:51 +07:00
parent 86b5221d24
commit 6d1b0f5379

View file

@ -47,8 +47,7 @@ export class ProfileNopaidController extends Controller {
})
public async getNopaid(@Path() profileId: string) {
const lists = await this.nopaidRepository.find({
where: { profileId: profileId },
select: ["id", "isActive", "date", "reference", "detail", "refCommandNo", "refCommandDate"],
where: { profileId },
});
return new HttpSuccess(lists);
}
@ -81,7 +80,6 @@ export class ProfileNopaidController extends Controller {
public async nopaidHistory(@Path() nopaidId: string) {
const record = await this.nopaidHistoryRepository.find({
where: { profileNopaidId: nopaidId },
select: ["id", "isActive", "date", "reference", "detail", "refCommandNo", "refCommandDate"],
order: { createdAt: "DESC" },
});
return new HttpSuccess(record);