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

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 ReligionController extends Controller {
religion.createdFullName = request.user.name;
religion.lastUpdateUserId = request.user.sub;
religion.lastUpdateFullName = request.user.name;
religion.createdAt = new Date();
religion.lastUpdatedAt = new Date();
await this.religionRepository.save(religion);
return new HttpSuccess();
}
@ -88,6 +90,7 @@ export class ReligionController extends Controller {
religion.lastUpdateUserId = request.user.sub;
religion.lastUpdateFullName = request.user.name;
religion.lastUpdatedAt = new Date();
this.religionRepository.merge(religion, requestBody);
await this.religionRepository.save(religion);
return new HttpSuccess();