[+] 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

@@ -14,14 +14,14 @@ import org.springframework.web.bind.annotation.RestController
import kotlin.jvm.optionals.getOrNull
@RestController
@RequestMapping("/api/v2/card")
@API("/api/v2/card")
class CardController(
val userRepo: AquaNetUserRepo,
val jwt: JWT,
val cardService: CardService,
val cardSummary: CardSummary,
) {
@RequestMapping("/summary")
@API("/summary")
suspend fun summary(@RP cardId: Str): Any
{
val card = cardService.tryLookup(cardId) ?: (404 - "Card not found")