From 01d3868b80882e7513e2ebbbe7f6904b1702f95b Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sun, 3 Dec 2023 20:10:49 -0700 Subject: [PATCH] fix endpoint for regenerating VAPID key --- app.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index 873bb97..e73a4f1 100644 --- a/app.py +++ b/app.py @@ -35,6 +35,7 @@ class WebPushService(): # Setting the application instance self.app = app + self.app.add_url_rule('/web-push/regenerate_vapid', view_func=self.regenerate_vapid, methods=['POST']) # Setting the database URI for the application db_uri = os.getenv('SQLALCHEMY_DATABASE_URI', 'sqlite:////app/instance/data/webpush.db') @@ -194,9 +195,7 @@ class WebPushService(): time.sleep(24 * 60 * 60) - @staticmethod - @app.route('/web-push/regenerate_vapid', methods=['POST']) - def regenerate_vapid() -> Tuple[str, int]: + def regenerate_vapid(self) -> Tuple[str, int]: """ Endpoint to regenerate VAPID keys.