Create dotenv token value
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
4a870624c4
commit
51823b2c10
@ -5,3 +5,4 @@ DESTINATION = "/var/invoices/"
|
||||
#DESTINATION = "../invoices/"
|
||||
|
||||
CHUNK_SIZE =1048576 # = 2 ** 20 = 1MB
|
||||
TOKEN="ZPOclCF5od59SgW6PLM2"
|
||||
|
@ -15,6 +15,7 @@ load_dotenv()
|
||||
SERVICE_URL = os.getenv('SERVICE_URL')
|
||||
DESTINATION = os.getenv('DESTINATION')
|
||||
CHUNK_SIZE = int(os.getenv('CHUNK_SIZE'))
|
||||
env_TOKEN = os.getenv('TOKEN')
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
app = FastAPI()
|
||||
@ -209,7 +210,7 @@ async def create_qr_code(code_content: Optional[str] = None, token: Optional[str
|
||||
Returns:
|
||||
Response: The QR code image as a Response object with media type "image/png".
|
||||
"""
|
||||
if token == 'ZPOclCF5od59SgW6PLM2':
|
||||
if token == env_TOKEN:
|
||||
if code_content:
|
||||
qr_image = make_qrcode(code_content)
|
||||
print("{} : QR Created".format(datetime.datetime.now()))
|
||||
|
Loading…
x
Reference in New Issue
Block a user