Database Backend

This commit is contained in:
Patrick_Pluto 2024-09-20 11:34:21 +02:00
parent 4a183c0c89
commit 115fb1d38d
2 changed files with 29 additions and 12 deletions

View file

@ -41,8 +41,15 @@ class API:
@self.app.route('/interstellar/api/db', methods=['POST'])
def db_manipulate():
action = request.args.get('action')
data = request.args.get('data')
if action == "create_account":
print("ahh")
self.db.add_user(data)
if action == "change_password":
self.db.update_password(data)
if action == "get_data":
self.db.get_additional_info(data)
if action == "check_credentials":
self.db.check_credentials(data)
ssl_context = ('cert.pem', 'key.pem')