add prepare data log method:POST
This commit is contained in:
parent
cc26192b65
commit
29527c512e
8 changed files with 32 additions and 14 deletions
|
|
@ -75,7 +75,7 @@ export class DevelopmentScholarshipController extends Controller {
|
|||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลระดับตำแหน่ง");
|
||||
}
|
||||
}
|
||||
|
||||
const before = null;
|
||||
const development = Object.assign(new DevelopmentScholarship(), requestBody);
|
||||
development.createdUserId = request.user.sub;
|
||||
development.createdFullName = request.user.name;
|
||||
|
|
@ -87,6 +87,7 @@ export class DevelopmentScholarshipController extends Controller {
|
|||
description: "Store Development Scholarship.",
|
||||
});
|
||||
await this.developmentScholarshipRepository.save(development, { data: request });
|
||||
setLogDataDiff(request, { before, after: development });
|
||||
return new HttpSuccess(development.id);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue