This commit is contained in:
Eric Meehan 2025-10-13 13:10:15 -04:00
parent f1b3eab3a3
commit 20931ba41f
2 changed files with 4 additions and 2 deletions

View File

@ -246,8 +246,8 @@ class Database():
cur.execute(self.SQL_GET_LAST_BLOCK)
blocks = cur.fetchall()
if blocks:
blockCard = self.get_card_by_block_id(lastBlock[0])
blockTransactions = self.get_transactions_by_block_id(lastBlock[0])
blockCard = self.get_card_by_block_id(blocks[0])
blockTransactions = self.get_transactions_by_block_id(blocks[0])
return [
Block(
blockId = uuid.UUID(block[0]),

View File

@ -171,6 +171,8 @@ def cards_get():
)
)
return flask.jsonify([card.as_dict() for card in deck] if deck else [])
else:
return flask.jsonify({'Error': "No public key."}), 400
except Exception as e:
return flask.jsonify(
{'Error': str(e)}