ADD VOLUME_MOUNT
parent
0e16e42cea
commit
74633edec8
|
|
@ -64,3 +64,6 @@ class CL_GET_DATABASE(BaseModel):
|
|||
class CL_GET_VOLUMES(BaseModel):
|
||||
name: str
|
||||
database: str
|
||||
|
||||
class CL_GET_CLIENT(BaseModel):
|
||||
name: str
|
||||
|
|
|
|||
10
main.py
10
main.py
|
|
@ -72,9 +72,17 @@ async def database_get(get: CL.CL_Database_get,api_key: APIKey = Depends(auth.ge
|
|||
return False
|
||||
|
||||
@app.post("/info/getvolume")
|
||||
async def getvolume(get: CL.CL_GET_VOLUMES,api_key: APIKey = Depends(auth.get_api_key)):
|
||||
async def getvolume(get: CL.CL_GET_CLIENT,api_key: APIKey = Depends(auth.get_api_key)):
|
||||
return database(f"SELECT * FROM `Clients` where `Name` = '{get.name}'",f"{get.database}","")
|
||||
|
||||
@app.post("info/getclient")
|
||||
async def getclient(get: CL.CL_GET_VOLUMES,api_key: APIKey = Depends(auth.get_api_key)):
|
||||
result = database(f"SELECT Firma FROM `Kunden-Clients` where `Name` = '{get.name}'","Stines-GmbH","")
|
||||
if not result:
|
||||
return False
|
||||
else:
|
||||
return result
|
||||
|
||||
@app.post("/info/getdatabase")
|
||||
async def getdatabase(get: CL.CL_GET_DATABASE,api_key: APIKey = Depends(auth.get_api_key)):
|
||||
return database(f"SELECT name FROM `Kunden-Server` where `IP-Adresse` = '{get.ip}'","Stines-GmbH","")[0][0]
|
||||
|
|
|
|||
Loading…
Reference in New Issue