diff options
author | Jannick <[email protected]> | 2024-04-29 11:10:40 +0200 |
---|---|---|
committer | Jannick <[email protected]> | 2024-04-29 11:10:40 +0200 |
commit | 51ee6bae10c4a01b56f063c133a18c380ff3d23e (patch) | |
tree | 1d9994cb5bc4eab219b5e3ef9ea44220f2489422 | |
parent | 9f7542416748050108394cb6e51676adbc90481c (diff) |
started integrating the database into the program
-rw-r--r-- | app.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -71,8 +71,10 @@ def join_submission(db: sqlite3.Connection): raise HTTPError(400, "Preferred role must be one of the options (DPS, Tank, Healer) ( idiot )") if motivation == None or motivation.strip() == "": raise HTTPError(400, "Motivitaion field is empty or missing.") + + db.execute("SELECT * FROM applications").fetchone() - db.execute(f"INSERT INTO applications(name, role, motivation) VALUES ({name}, {preferred_role}, {motivation})") + db.execute("INSERT INTO applications(name, role, motivation) VALUES (?, ?, ?)", (name, preferred_role, motivation)) @app.route("/<type:re:styles|images>/<filename>") def server_static(type, filename): |