Commit 70986542 authored by Ismail Moumni's avatar Ismail Moumni
Browse files

editing database and server

parent 4c31b80b
Pipeline #720 passed with stage
in 13 seconds
......@@ -108,4 +108,4 @@ def get_generators():
myresult = mycursor.fetchall()
for result in myresult:
generators[result[0]] = [result]
......@@ -115,3 +115,15 @@ def verif_param(data: dict):
raise Exception("Query Doesn't match")
raise Exception("Error Database")
# Function db_generators returns database generators
# Function takes a dictionary request from client side
# Function returns all database generators or raises an error if request doesn't match
def db_generators(req: dict):
match = {"request": "generators"}
if(req == match):
s = db.get_generators()
return s
raise Exception("Error Database")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment