[+] Add @ API macro

This commit is contained in:
Azalea
2024-02-20 15:46:48 -05:00
parent befa7d0e8e
commit 0567e0f251
5 changed files with 17 additions and 12 deletions

View File

@@ -5,6 +5,9 @@ import org.springframework.http.ResponseEntity
import org.springframework.web.bind.annotation.ControllerAdvice
import org.springframework.web.bind.annotation.ExceptionHandler
val SUCCESS = ResponseEntity.ok().body(mapOf("status" to "ok"))
class ApiException(val code: Int, message: Str) : RuntimeException(message)
@ControllerAdvice