added new endpoints, getUser, getUserHistories, getBookmarks

This commit is contained in:
heyethereum
2024-07-20 01:10:28 +08:00
parent f7e592f8ec
commit ee3180dbea
33 changed files with 261 additions and 55 deletions

View File

@@ -19,19 +19,19 @@ public final class PhoneModel extends QRCodeModel<PhoneEntity> {
private final PhoneVerificationService phoneVerificationService;
public PhoneModel(QRCodeEntity scannedQRCodeEntity, PhoneVerificationService phoneVerificationService) {
this.scannedQRCode = scannedQRCodeEntity;
this.data = scannedQRCodeEntity;
this.phoneVerificationService = phoneVerificationService;
this.details = null;
}
@Override
public void setDetails() {
details = PhoneEntity.builder().qrCodeId(scannedQRCode.getId()).build();
details = PhoneEntity.builder().qrCodeId(data.getId()).build();
// Insert into phone table
phoneVerificationService.insertDB(details);
}
@Override
public PhoneEntity getDetails () {
return new PhoneEntity();
return phoneVerificationService.getPhoneEntityByQRCodeId(data.getId());
}
}