forked from Cookies_Github_mirror/AquaDX
[O] Reduce loc
This commit is contained in:
@@ -29,13 +29,17 @@ typealias API = RequestMapping
|
||||
typealias Str = String
|
||||
typealias Bool = Boolean
|
||||
|
||||
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
|
||||
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Doc(
|
||||
val desc: String,
|
||||
val ret: String = ""
|
||||
)
|
||||
|
||||
@Target(AnnotationTarget.VALUE_PARAMETER)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class SettingField(val name: Str, val desc: Str)
|
||||
|
||||
// Make it easier to throw a ResponseStatusException
|
||||
operator fun HttpStatus.invoke(message: String? = null): Nothing = throw ApiException(value(), message ?: this.reasonPhrase)
|
||||
operator fun Int.minus(message: String): Nothing {
|
||||
|
||||
Reference in New Issue
Block a user