From df799c1bcb7c92e38aaf52033de3fbd3042e1010 Mon Sep 17 00:00:00 2001 From: crowetic Date: Wed, 11 Dec 2024 16:27:29 -0800 Subject: [PATCH] Added fix for updating existing cards, and check foe existingCardIdentifier variable, changed card search to disclude comments in old publish method. --- assets/js/MinterBoard.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/assets/js/MinterBoard.js b/assets/js/MinterBoard.js index 576297d..a89465a 100644 --- a/assets/js/MinterBoard.js +++ b/assets/js/MinterBoard.js @@ -120,8 +120,9 @@ async function fetchExistingCard() { const response = await qortalRequest({ action: "SEARCH_QDN_RESOURCES", service: "BLOG_POST", - query: userState.accountName, // Scoped to the user identifier: cardIdentifierPrefix, + name: userState.accountName, + exactMatchNames: true //we want to search for the EXACT userName only when finding existing cards. }); console.log(`SEARCH_QDN_RESOURCES response: ${JSON.stringify(response, null, 2)}`); @@ -214,7 +215,7 @@ async function publishCard() { return; } - const cardIdentifier = isExistingCard ? existingCardInfo.identifier : `${cardIdentifierPrefix}-${await uid()}`; + const cardIdentifier = isExistingCard ? existingCardIdentifier : `${cardIdentifierPrefix}-${await uid()}`; const pollName = `${cardIdentifier}-poll`; const pollDescription = `Mintership Board Poll for ${userState.accountName}`;