revert
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m2s

This commit is contained in:
harid 2026-06-12 18:02:54 +07:00
parent 8232c6696e
commit 7920832c5c
2 changed files with 3 additions and 12 deletions

View file

@ -111,14 +111,9 @@ export class ProfileChangeNameController extends Controller {
setLogDataDiff(req, { before, after: history });
profile.firstName = body.firstName ?? profile.firstName;
profile.lastName = body.lastName ?? profile.lastName;
//old
// profile.prefix = body.prefix ?? profile.prefix;
// profile.rank = body.rank ?? profile.rank;
// profile.prefixMain = profile.rank ?? profile.prefix;
//new
profile.prefixMain = profile.prefix;
profile.prefix = profile.rank && profile.rank.length > 0 ? profile.rank : profile.prefix;
profile.prefix = body.prefix ?? profile.prefix;
profile.rank = body.rank ?? profile.rank;
profile.prefixMain = profile.rank ?? profile.prefix;
await this.profileRepository.save(profile, { data: req });
setLogDataDiff(req, { before, after: profile });