mirror of https://github.com/hykilpikonna/AquaDX
[M] Rename: Bind -> Link
parent
49320ff623
commit
a001a45cc4
|
@ -8,7 +8,7 @@ export interface Card {
|
||||||
luid: string
|
luid: string
|
||||||
registerTime: string
|
registerTime: string
|
||||||
accessTime: string
|
accessTime: string
|
||||||
bound: boolean
|
linked: boolean
|
||||||
ghost: boolean
|
ghost: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -95,5 +95,5 @@ export const CARD = {
|
||||||
summary: (cardId: string): Promise<{card: Card, summary: CardSummary}> =>
|
summary: (cardId: string): Promise<{card: Card, summary: CardSummary}> =>
|
||||||
post('/api/v2/card/summary', { cardId }),
|
post('/api/v2/card/summary', { cardId }),
|
||||||
link: (props: { cardId: string, migrate: string }) =>
|
link: (props: { cardId: string, migrate: string }) =>
|
||||||
post('/api/v2/card/bind', props),
|
post('/api/v2/card/link', props),
|
||||||
}
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
<script>
|
<script>
|
||||||
import BindCard from "./Home/LinkCard.svelte";
|
import LinkCard from "./Home/LinkCard.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<main class="content">
|
<main class="content">
|
||||||
<h2>Welcome to AquaDX!</h2>
|
<h2>Welcome to AquaDX!</h2>
|
||||||
|
|
||||||
<BindCard/>
|
<LinkCard/>
|
||||||
</main>
|
</main>
|
|
@ -72,7 +72,7 @@
|
||||||
const summary = card.summary
|
const summary = card.summary
|
||||||
|
|
||||||
// Check if it's already linked
|
// Check if it's already linked
|
||||||
if (card.card.bound) {
|
if (card.card.linked) {
|
||||||
setError("This card is already linked to another account", type)
|
setError("This card is already linked to another account", type)
|
||||||
state = "ready"
|
state = "ready"
|
||||||
return
|
return
|
||||||
|
|
|
@ -42,8 +42,8 @@ class CardController(
|
||||||
* @param cardId Card ID
|
* @param cardId Card ID
|
||||||
* @param migrate Things to migrate, stored as a comma-separated list of game IDs (e.g. "maimai2,chusan")
|
* @param migrate Things to migrate, stored as a comma-separated list of game IDs (e.g. "maimai2,chusan")
|
||||||
*/
|
*/
|
||||||
@API("/bind")
|
@API("/link")
|
||||||
suspend fun bind(@RP token: Str, @RP cardId: Str, @RP migrate: Str) = jwt.auth(token) { u ->
|
suspend fun link(@RP token: Str, @RP cardId: Str, @RP migrate: Str) = jwt.auth(token) { u ->
|
||||||
// Check if the user's card limit is reached
|
// Check if the user's card limit is reached
|
||||||
if (u.cards.size >= props.linkCardLimit) 400 - "Card limit reached"
|
if (u.cards.size >= props.linkCardLimit) 400 - "Card limit reached"
|
||||||
|
|
||||||
|
|
|
@ -48,5 +48,5 @@ class Card(
|
||||||
private val serialVersionUID = 1L
|
private val serialVersionUID = 1L
|
||||||
}
|
}
|
||||||
|
|
||||||
val isBound get() = aquaUser != null
|
val isLinked get() = aquaUser != null
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue