forked from Cookies_Github_mirror/AquaDX
[F] Fix apis
This commit is contained in:
@@ -12,7 +12,6 @@ import icu.samnyan.aqua.sega.chusan.dao.userdata.UserDataRepository
|
||||
import icu.samnyan.aqua.sega.chusan.dao.userdata.UserGeneralDataRepository
|
||||
import icu.samnyan.aqua.sega.chusan.dao.userdata.UserPlaylogRepository
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
import java.time.format.DateTimeFormatter
|
||||
|
||||
@RestController
|
||||
@API("api/v2/game/chu3")
|
||||
@@ -24,9 +23,8 @@ class Chusan(
|
||||
): GameApiController
|
||||
{
|
||||
override fun trend(@RP username: Str): List<TrendOut> = us.byName(username) { u ->
|
||||
val fmt = DateTimeFormatter.ofPattern("YYYY-MM-DD")
|
||||
findTrend(userPlaylogRepository.findByUser_Card_ExtId(u.ghostCard.extId)
|
||||
.map { TrendLog(fmt.format(it.playDate), it.playerRating) })
|
||||
.map { TrendLog(it.playDate.toString(), it.playerRating) })
|
||||
}
|
||||
|
||||
// Only show > AAA rank
|
||||
|
||||
@@ -2,17 +2,10 @@ package icu.samnyan.aqua.net.games
|
||||
|
||||
import ext.API
|
||||
import ext.RP
|
||||
import icu.samnyan.aqua.net.utils.IGenericGamePlaylog
|
||||
|
||||
data class TrendOut(val date: String, val rating: Int, val plays: Int)
|
||||
|
||||
data class GenericGamePlaylog(
|
||||
val playDate: String,
|
||||
val achievement: Int,
|
||||
val maxCombo: Int,
|
||||
val totalCombo: Int,
|
||||
val afterRating: Int
|
||||
)
|
||||
|
||||
data class RankCount(val name: String, val count: Int)
|
||||
|
||||
data class GenericGameSummary(
|
||||
@@ -37,7 +30,7 @@ data class GenericGameSummary(
|
||||
|
||||
val ratingComposition: Map<String, Any>,
|
||||
|
||||
val recent: List<GenericGamePlaylog>
|
||||
val recent: List<IGenericGamePlaylog>
|
||||
)
|
||||
|
||||
interface GameApiController {
|
||||
|
||||
Reference in New Issue
Block a user