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

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

@ -97,6 +97,8 @@ export class PrefixController extends Controller {
_prefix.createdFullName = request.user.name;
_prefix.lastUpdateUserId = request.user.sub;
_prefix.lastUpdateFullName = request.user.name;
_prefix.createdAt = new Date();
_prefix.lastUpdatedAt = new Date();
await this.prefixRepository.save(_prefix);
return new HttpSuccess();
}
@ -128,6 +130,7 @@ export class PrefixController extends Controller {
_prefix.lastUpdateUserId = request.user.sub;
_prefix.lastUpdateFullName = request.user.name;
_prefix.lastUpdatedAt = new Date();
this.prefixRepository.merge(_prefix, requestBody);
await this.prefixRepository.save(_prefix);
return new HttpSuccess();