Showing
3 changed files
with
5 additions
and
3 deletions
... | @@ -65,7 +65,9 @@ def register(): | ... | @@ -65,7 +65,9 @@ def register(): |
65 | print(msg) | 65 | print(msg) |
66 | sql = "SELECT student_id FROM student WHERE student_id = %s;" | 66 | sql = "SELECT student_id FROM student WHERE student_id = %s;" |
67 | cursor.execute(sql, (student_id)) | 67 | cursor.execute(sql, (student_id)) |
68 | - if cursor.rowcount == 0: | 68 | + if cursor.rowcount > 0: |
69 | + send = jsonify({'status': 'already', 'student_id': student_id}) | ||
70 | + return send | ||
69 | sql = "INSERT INTO student(student_id, student_name) VALUES (%s, %s)" | 71 | sql = "INSERT INTO student(student_id, student_name) VALUES (%s, %s)" |
70 | cursor.execute(sql, (student_id, student_name)) | 72 | cursor.execute(sql, (student_id, student_name)) |
71 | sql = "INSERT INTO lecture_students(lecture_id, student_id) VALUES (%s, %s)" | 73 | sql = "INSERT INTO lecture_students(lecture_id, student_id) VALUES (%s, %s)" | ... | ... |
... | @@ -216,7 +216,7 @@ function main() | ... | @@ -216,7 +216,7 @@ function main() |
216 | <div> | 216 | <div> |
217 | <!-- Header --> | 217 | <!-- Header --> |
218 | <header class="w3-container w3-center w3-padding-32"> | 218 | <header class="w3-container w3-center w3-padding-32"> |
219 | - <h1><b>얼굴 등록</b></h1> | 219 | + <h1><b>얼굴 인식 출석 시스템</b></h1> |
220 | <p>Made by <span class="w3-tag">정해갑</span></p> | 220 | <p>Made by <span class="w3-tag">정해갑</span></p> |
221 | </header> | 221 | </header> |
222 | </div> | 222 | </div> | ... | ... |
-
Please register or login to post a comment