summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorLex Neva <lexelby@users.noreply.github.com>2023-02-26 17:35:22 -0500
committerGitHub <noreply@github.com>2023-02-26 17:35:22 -0500
commit97f711b9807b422329f26b6db7a77fb102e0664d (patch)
tree6051a865838b3df6fbb558e7bbe1c6a2a78c6e1c /lib/api
parented0ab5a44d08068e9f02bc689edc03899995e74b (diff)
parent36f0946e2d7ccc7b9736eaac5ebd4852d070eab7 (diff)
Merge pull request #2088 from inkstitch/lexelby/fix-preferences-set-default
fix preferences "set default" buttons
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/server.py4
1 files changed, 2 insertions, 2 deletions
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")