add dpis controller
This commit is contained in:
parent
497decefe4
commit
4852131651
74 changed files with 606 additions and 336 deletions
|
|
@ -72,7 +72,7 @@ export class ProfileTrainingController extends Controller {
|
|||
}
|
||||
|
||||
@Get("history/{trainingId}")
|
||||
public async trainingHistory(@Path() trainingId: string,) {
|
||||
public async trainingHistory(@Path() trainingId: string) {
|
||||
const record = await this.trainingHistoryRepo.find({
|
||||
where: {
|
||||
profileTrainingId: trainingId,
|
||||
|
|
@ -110,7 +110,7 @@ export class ProfileTrainingController extends Controller {
|
|||
Object.assign(history, { ...data, id: undefined });
|
||||
|
||||
await this.trainingRepo.save(data, { data: req });
|
||||
setLogDataDiff( req, { before, after: data} )
|
||||
setLogDataDiff(req, { before, after: data });
|
||||
history.profileTrainingId = data.id;
|
||||
await this.trainingHistoryRepo.save(history, { data: req });
|
||||
|
||||
|
|
@ -145,7 +145,7 @@ export class ProfileTrainingController extends Controller {
|
|||
|
||||
await Promise.all([
|
||||
this.trainingRepo.save(record, { data: req }),
|
||||
setLogDataDiff( req, { before, after: record} ),
|
||||
setLogDataDiff(req, { before, after: record }),
|
||||
this.trainingHistoryRepo.save(history, { data: req }),
|
||||
]);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue