Getting ready for K8S deploy #7

Merged
eric merged 6 commits from develop into main 2025-10-27 16:18:07 +00:00
2 changed files with 4 additions and 2 deletions
Showing only changes of commit 20931ba41f - Show all commits

View File

@ -246,8 +246,8 @@ class Database():
cur.execute(self.SQL_GET_LAST_BLOCK) cur.execute(self.SQL_GET_LAST_BLOCK)
blocks = cur.fetchall() blocks = cur.fetchall()
if blocks: if blocks:
blockCard = self.get_card_by_block_id(lastBlock[0]) blockCard = self.get_card_by_block_id(blocks[0])
blockTransactions = self.get_transactions_by_block_id(lastBlock[0]) blockTransactions = self.get_transactions_by_block_id(blocks[0])
return [ return [
Block( Block(
blockId = uuid.UUID(block[0]), 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 []) 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: except Exception as e:
return flask.jsonify( return flask.jsonify(
{'Error': str(e)} {'Error': str(e)}