generated from nathanwoodburn/python-webserver-template
feat: Add og image and fix int parsing for blocks
All checks were successful
Build Docker / BuildImage (push) Successful in 2m19s
All checks were successful
Build Docker / BuildImage (push) Successful in 2m19s
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -7,6 +7,12 @@
|
||||
<title>Nathan.Woodburn/</title>
|
||||
<link rel="icon" href="/assets/img/favicon.png" type="image/png">
|
||||
<link rel="stylesheet" href="/assets/css/404.css">
|
||||
|
||||
<!-- Open Graph meta tags -->
|
||||
<meta property="og:title" content="FireAlerts">
|
||||
<meta property="og:description" content="Get alerted before your Handshake domains expire.">
|
||||
<meta property="og:image" content="/assets/img/og.png">
|
||||
<meta property="og:type" content="website">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
@@ -7,6 +7,12 @@
|
||||
<title>FireAlerts</title>
|
||||
<link rel="icon" href="/assets/img/favicon.png" type="image/png">
|
||||
<link rel="stylesheet" href="/assets/css/index.css">
|
||||
|
||||
<!-- Open Graph meta tags -->
|
||||
<meta property="og:title" content="FireAlerts - Account">
|
||||
<meta property="og:description" content="Manage your Handshake domain expiry alerts.">
|
||||
<meta property="og:image" content="/assets/img/og.png">
|
||||
<meta property="og:type" content="website">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
BIN
templates/assets/img/og.png
Normal file
BIN
templates/assets/img/og.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 102 KiB |
@@ -7,6 +7,12 @@
|
||||
<title>FireAlerts</title>
|
||||
<link rel="icon" href="/assets/img/favicon.png" type="image/png">
|
||||
<link rel="stylesheet" href="/assets/css/index.css">
|
||||
|
||||
<!-- Open Graph meta tags -->
|
||||
<meta property="og:title" content="FireAlerts">
|
||||
<meta property="og:description" content="Get alerted before your Handshake domains expire.">
|
||||
<meta property="og:image" content="/assets/img/og.png">
|
||||
<meta property="og:type" content="website">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user