mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-10 16:27:28 +08:00
[O] Check if already linked
This commit is contained in:
@@ -41,6 +41,13 @@
|
|||||||
|
|
||||||
console.log("linking card", id)
|
console.log("linking card", id)
|
||||||
|
|
||||||
|
// Check if this card is already linked in the account
|
||||||
|
if (me?.cards?.some(c => formatLUID(c.luid).toLowerCase() === id.toLowerCase())) {
|
||||||
|
setError("This card is already linked to your account", type)
|
||||||
|
state = "ready"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// First, lookup the card summary
|
// First, lookup the card summary
|
||||||
const card = (await CARD.summary(id).catch(e => {
|
const card = (await CARD.summary(id).catch(e => {
|
||||||
// If card is not found,
|
// If card is not found,
|
||||||
|
|||||||
Reference in New Issue
Block a user