From 36f0946e2d7ccc7b9736eaac5ebd4852d070eab7 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Wed, 22 Feb 2023 21:08:40 -0500 Subject: fix flask json deprecation --- lib/api/server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/api') diff --git a/lib/api/server.py b/lib/api/server.py index 626e412e..f9bb6458 100644 --- a/lib/api/server.py +++ b/lib/api/server.py @@ -14,7 +14,7 @@ import requests from flask import Flask, g from werkzeug.serving import make_server -from ..utils.json import InkStitchJSONEncoder +from ..utils.json import InkStitchJSONProvider from .install import install from .simulator import simulator from .stitch_plan import stitch_plan @@ -41,7 +41,7 @@ class APIServer(Thread): cli.show_server_banner = lambda *x: None self.app = Flask(__name__) - self.app.json_encoder = InkStitchJSONEncoder + self.app.json = InkStitchJSONProvider(self.app) self.app.register_blueprint(simulator, url_prefix="/simulator") self.app.register_blueprint(stitch_plan, url_prefix="/stitch_plan") -- cgit v1.2.3