ADD VOLUME_MOUNT
parent
2e5eae6eff
commit
b909a09a3e
|
|
@ -67,3 +67,7 @@ class CL_GET_VOLUMES(BaseModel):
|
|||
|
||||
class CL_GET_CLIENT(BaseModel):
|
||||
name: str
|
||||
|
||||
class CL_ADD_CLIENT(BaseModel):
|
||||
query: str
|
||||
database: str
|
||||
|
|
|
|||
6
main.py
6
main.py
|
|
@ -87,6 +87,12 @@ async def getclient(get: CL.CL_GET_CLIENT,api_key: APIKey = Depends(auth.get_api
|
|||
else:
|
||||
return result[0][0]
|
||||
|
||||
@app.post("/info/addclient")
|
||||
async def addclient(addclient: CL.CL_ADD_CLIENT,api_key: APIKey = Depends(auth.get_api_key)):
|
||||
database(addclient.query,addclient.database,"")
|
||||
return f"Client wurde zur Datenbank hinzugefügt"
|
||||
|
||||
|
||||
@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