feat: Add og image and fix int parsing for blocks
All checks were successful
Build Docker / BuildImage (push) Successful in 2m19s

This commit is contained in:
2025-07-25 12:05:17 +10:00
parent c53a42b5c9
commit 0b623e2797
5 changed files with 27 additions and 0 deletions

View File

@@ -174,6 +174,15 @@ def addNotification(notificationtype: str):
notification = data
# Convert blocks to integer
try:
blocks = int(notification['blocks'])
if blocks <= 0:
return jsonify({"error": "Blocks must be a positive integer"}), 400
except ValueError:
return jsonify({"error": "Invalid blocks value"}), 400
notification['blocks'] = blocks # type: ignore
notification['type'] = notificationtype
notification['id'] = os.urandom(16).hex() # Generate a random ID for the notification
notification['user_name'] = username