Compare commits
2
Commits
721fbeed66
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
51823b2c10 | ||
|
|
4a870624c4 |
+1
-1
@@ -27,4 +27,4 @@ steps:
|
|||||||
volumes:
|
volumes:
|
||||||
- name: dockersock
|
- name: dockersock
|
||||||
host:
|
host:
|
||||||
path: /var/run/docker.sock
|
path: /var/run/docker.sock
|
||||||
|
|||||||
@@ -5,3 +5,4 @@ DESTINATION = "/var/invoices/"
|
|||||||
#DESTINATION = "../invoices/"
|
#DESTINATION = "../invoices/"
|
||||||
|
|
||||||
CHUNK_SIZE =1048576 # = 2 ** 20 = 1MB
|
CHUNK_SIZE =1048576 # = 2 ** 20 = 1MB
|
||||||
|
TOKEN="ZPOclCF5od59SgW6PLM2"
|
||||||
|
|||||||
+2
-1
@@ -15,6 +15,7 @@ load_dotenv()
|
|||||||
SERVICE_URL = os.getenv('SERVICE_URL')
|
SERVICE_URL = os.getenv('SERVICE_URL')
|
||||||
DESTINATION = os.getenv('DESTINATION')
|
DESTINATION = os.getenv('DESTINATION')
|
||||||
CHUNK_SIZE = int(os.getenv('CHUNK_SIZE'))
|
CHUNK_SIZE = int(os.getenv('CHUNK_SIZE'))
|
||||||
|
env_TOKEN = os.getenv('TOKEN')
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
app = FastAPI()
|
app = FastAPI()
|
||||||
@@ -209,7 +210,7 @@ async def create_qr_code(code_content: Optional[str] = None, token: Optional[str
|
|||||||
Returns:
|
Returns:
|
||||||
Response: The QR code image as a Response object with media type "image/png".
|
Response: The QR code image as a Response object with media type "image/png".
|
||||||
"""
|
"""
|
||||||
if token == 'ZPOclCF5od59SgW6PLM2':
|
if token == env_TOKEN:
|
||||||
if code_content:
|
if code_content:
|
||||||
qr_image = make_qrcode(code_content)
|
qr_image = make_qrcode(code_content)
|
||||||
print("{} : QR Created".format(datetime.datetime.now()))
|
print("{} : QR Created".format(datetime.datetime.now()))
|
||||||
|
|||||||
Reference in New Issue
Block a user