เพิ่มวันที่แก้ไข

This commit is contained in:
kittapath 2024-08-30 21:02:14 +07:00
parent 218886b3f4
commit ad4efc2b47
28 changed files with 205 additions and 40 deletions

View file

@ -55,6 +55,8 @@ export class RankController extends Controller {
rank.createdFullName = request.user.name;
rank.lastUpdateUserId = request.user.sub;
rank.lastUpdateFullName = request.user.name;
rank.createdAt = new Date();
rank.lastUpdatedAt = new Date();
await this.rankRepository.save(rank);
return new HttpSuccess();
}
@ -88,6 +90,7 @@ export class RankController extends Controller {
rank.lastUpdateUserId = request.user.sub;
rank.lastUpdateFullName = request.user.name;
rank.lastUpdatedAt = new Date();
this.rankRepository.merge(rank, requestBody);
await this.rankRepository.save(rank);
return new HttpSuccess();