added new endpoints delete scanned history, delete all scanned histories, delete bookmarks, delete all bookmarks

This commit is contained in:
heyethereum
2024-07-20 22:12:22 +08:00
parent ee3180dbea
commit 77541c2a9d
20 changed files with 226 additions and 32 deletions

View File

@@ -1,6 +1,6 @@
package com.safeqr.app.qrcode.service;
import com.safeqr.app.exceptions.CustomNotFoundExceptions;
import com.safeqr.app.exceptions.ResourceNotFoundExceptions;
import com.safeqr.app.qrcode.entity.PhoneEntity;
import com.safeqr.app.qrcode.repository.PhoneRepository;
import org.slf4j.Logger;
@@ -22,7 +22,7 @@ public class PhoneVerificationService {
public PhoneEntity getPhoneEntityByQRCodeId(UUID qrCodeId) {
logger.info("qrCodeId retrieving: {}", qrCodeId);
return phoneRepository.findByQrCodeId(qrCodeId)
.orElseThrow(() -> new CustomNotFoundExceptions("Phone not found for QR Code id: " + qrCodeId));
.orElseThrow(() -> new ResourceNotFoundExceptions("Phone not found for QR Code id: " + qrCodeId));
}
public void insertDB(PhoneEntity phoneEntity) {
phoneRepository.save(phoneEntity);