feat: add support for multiple label formats in get_label function
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user