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.SMSEntity;
import com.safeqr.app.qrcode.repository.SMSRepository;
import org.slf4j.Logger;
@@ -23,7 +23,7 @@ public class SMSVerificationService {
public SMSEntity getSMSEntityByQRCodeId(UUID qrCodeId) {
logger.info("qrCodeId retrieving: {}", qrCodeId);
return smsRepository.findByQrCodeId(qrCodeId)
.orElseThrow(() -> new CustomNotFoundExceptions("SMS not found for QR Code id: " + qrCodeId));
.orElseThrow(() -> new ResourceNotFoundExceptions("SMS not found for QR Code id: " + qrCodeId));
}
public void insertDB(SMSEntity smsEntity) {
smsRepository.save(smsEntity);