Skip to content

Commit

Permalink
Update app.py
Browse files Browse the repository at this point in the history
  • Loading branch information
minseo0388 committed Sep 28, 2024
1 parent 0522bb3 commit e470a05
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions app.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from flask import Flask, jsonify, g
import qr
import qrcode

app = Flask(__name__)

Expand All @@ -12,12 +13,12 @@ def CNUqrhome():
def CNUqr(ID):
return qr.qrmaker(ID).load("result.png")

@app.route('/cnuqr/getid', methods=['GET'])
def getID():
if hasattr(g, 'studentID'):
return f"Stored student ID is: {g.studentID}"
else:
return "No student ID stored."
# @app.route('/cnuqr/getid', methods=['GET'])
# def getID():
# if hasattr(g, 'studentID'):
# return f"Stored student ID is: {g.studentID}"
# else:
# return "No student ID stored."

if __name__ == '__main__':
app.run('127.0.0.1', 5000, debug=True)

0 comments on commit e470a05

Please sign in to comment.