diff options
| author | Lex Neva <github.com@lexneva.name> | 2023-02-22 21:08:40 -0500 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2023-02-22 21:10:33 -0500 |
| commit | 36f0946e2d7ccc7b9736eaac5ebd4852d070eab7 (patch) | |
| tree | 2957b542afe4b80cddcb892ef09f060fd1677f0a /lib/api | |
| parent | 7d57a22f01bebf43a9787d26543e3e5e029a8b9e (diff) | |
fix flask json deprecation
Diffstat (limited to 'lib/api')
| -rw-r--r-- | lib/api/server.py | 4 |
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") |
