เช็คเลขบัตร ปชช.
This commit is contained in:
parent
68394fe07c
commit
a529207692
9 changed files with 60 additions and 12 deletions
|
|
@ -20,7 +20,7 @@ import { RequestWithUser } from "../middlewares/user";
|
|||
import { Profile } from "../entities/Profile";
|
||||
import { ProfileFamilyCouple, CreateProfileFamilyCouple, UpdateProfileFamilyCouple } from "../entities/ProfileFamilyCouple";
|
||||
import { ProfileFamilyCoupleHistory } from "../entities/ProfileFamilyCoupleHistory";
|
||||
|
||||
import Extension from "../interfaces/extension";
|
||||
@Route("api/v1/org/profile/family/couple")
|
||||
@Tags("ProfileFamilyCouple")
|
||||
@Security("bearerAuth")
|
||||
|
|
@ -142,6 +142,7 @@ export class ProfileFamilyCoupleController extends Controller {
|
|||
if (!profile) {
|
||||
throw new HttpError(HttpStatus.BAD_REQUEST, "ไม่พบ profile ดังกล่าว");
|
||||
}
|
||||
familyCouple.coupleCitizenId = Extension.CheckCitizen(String(body.coupleCitizenId));
|
||||
familyCouple.createdUserId = req.user.sub;
|
||||
familyCouple.createdFullName = req.user.name;
|
||||
familyCouple.lastUpdateUserId = req.user.sub;
|
||||
|
|
@ -187,6 +188,7 @@ export class ProfileFamilyCoupleController extends Controller {
|
|||
Object.assign(familyCouple, body);
|
||||
familyCouple.lastUpdateUserId = req.user.sub,
|
||||
familyCouple.lastUpdateFullName = req.user.name;
|
||||
familyCouple.coupleCitizenId = Extension.CheckCitizen(String(body.coupleCitizenId));
|
||||
history.profileFamilyCoupleId = familyCouple.id;
|
||||
history.couplePrefix = familyCouple.couplePrefix,
|
||||
history.coupleFirstName = familyCouple.coupleFirstName,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue