[F] Fix response syntax limitation

This commit is contained in:
Azalea
2024-02-19 03:16:35 -05:00
parent e962baaf48
commit 77b2f90259
3 changed files with 26 additions and 23 deletions

View File

@@ -21,7 +21,7 @@ typealias Bool = Boolean
// Make it easier to throw a ResponseStatusException
operator fun HttpStatus.invoke(message: String? = null): Nothing = throw ApiException(value(), message ?: this.reasonPhrase)
operator fun Int.compareTo(message: String): Int = throw ApiException(this, message)
operator fun Int.minus(message: String): Nothing = throw ApiException(this, message)
// Email validation
// https://www.baeldung.com/java-email-validation-regex