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

@@ -0,0 +1,7 @@
package com.safeqr.app.exceptions;
public class CustomNotFoundExceptions extends RuntimeException {
public CustomNotFoundExceptions(String message){
super(message);
}
}

View File

@@ -8,8 +8,8 @@ import org.springframework.web.bind.annotation.ExceptionHandler;
@ControllerAdvice
public class GlobalExceptionHandler {
@ExceptionHandler(QRCodeExceptions.class)
public ResponseEntity<ErrorResponse> handleQRCodeNotFoundException(QRCodeExceptions e) {
@ExceptionHandler(CustomNotFoundExceptions.class)
public ResponseEntity<ErrorResponse> handleResourceNotFoundException(CustomNotFoundExceptions e) {
return new ResponseEntity<>(new ErrorResponse(e.getMessage(), HttpStatus.NOT_FOUND.value()), HttpStatus.NOT_FOUND);
}
}

View File

@@ -1,7 +0,0 @@
package com.safeqr.app.exceptions;
public class QRCodeExceptions extends RuntimeException {
public QRCodeExceptions(String message){
super(message);
}
}