feat: add support for multiple label formats in get_label function

This commit is contained in:
2025-05-26 22:48:51 +03:00
parent 6ca3a9372a
commit 9c904ae138

View File

@@ -1,3 +1,5 @@
import json
from flask import Blueprint, request, send_file, jsonify
from routes.utils import jwt_protect_blueprint
import sipro.api.printing
@@ -18,4 +20,5 @@ def get_label():
as_attachment=True,
download_name='label.pdf',
mimetype='application/pdf')
return jsonify(data.read().decode('utf-8'))
data= json.loads(str(data.read(), 'ascii'))
return jsonify(data)