diff --git a/Web/app.py b/Web/app.py index bd82858..faeaea1 100755 --- a/Web/app.py +++ b/Web/app.py @@ -10373,6 +10373,14 @@ def my_borrowed_items(): ) +@app.route('/api/push/vapid-key', methods=['GET']) +def get_vapid_key(): + """Returns the VAPID public key for web push subscriptions.""" + from Web.push_notifications import _get_vapid_public + if not _get_vapid_public(): + return jsonify({'error': 'VAPID public key not configured'}), 500 + return jsonify({'publicKey': _get_vapid_public()}) + @app.route('/notifications') def notifications_view(): """Notification center for users and admins."""