mirror of https://github.com/hykilpikonna/AquaDX
[+] Mai2 add query for owned items
parent
7427609bee
commit
d2a2bad111
|
@ -6,7 +6,6 @@ import icu.samnyan.aqua.net.games.*
|
|||
import icu.samnyan.aqua.net.utils.*
|
||||
import icu.samnyan.aqua.sega.maimai2.model.*
|
||||
import icu.samnyan.aqua.sega.maimai2.model.userdata.*
|
||||
import org.springframework.web.bind.annotation.GetMapping
|
||||
import org.springframework.web.bind.annotation.PostMapping
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
import java.util.*
|
||||
|
@ -112,7 +111,7 @@ class Maimai2(
|
|||
mapOf("newName" to newNameFull)
|
||||
}
|
||||
|
||||
@GetMapping("get-login-bonus")
|
||||
@API("get-login-bonus")
|
||||
suspend fun getLoginBonus(@RP token: String) = us.jwt.auth(token) { u ->
|
||||
us.cardByName(u.username) { card ->
|
||||
repos.userLoginBonus.findByUser_Card_ExtId(card.extId)
|
||||
|
@ -141,6 +140,13 @@ class Maimai2(
|
|||
SUCCESS
|
||||
}
|
||||
|
||||
@API("owned-items")
|
||||
suspend fun ownedItems(@RP token: String) = us.jwt.auth(token) { u ->
|
||||
us.cardByName(u.username) { card ->
|
||||
repos.userItem.findByUser_Card_ExtId(card.extId)
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping("set-rival")
|
||||
suspend fun setRival(@RP token: String, @RP rivalUserName: String, @RP isAdd: Boolean) = us.jwt.auth(token) { u ->
|
||||
us.cardByName(u.username) { myCard ->
|
||||
|
|
Loading…
Reference in New Issue