Many Chanegs
parent
aac89b9fa6
commit
938a3d87c8
5
main.py
5
main.py
|
|
@ -49,6 +49,11 @@ def database(query,name,user):
|
||||||
|
|
||||||
app = FastAPI()
|
app = FastAPI()
|
||||||
|
|
||||||
|
|
||||||
|
@app.get("/")
|
||||||
|
async def notify():
|
||||||
|
return database(f"SELECT * FROM notifications", "Stines-GmbH","")
|
||||||
|
|
||||||
@app.post("/ping")
|
@app.post("/ping")
|
||||||
async def ping(ping: CL.CL_Ping_Set,api_key: APIKey = Depends(auth.get_api_key)):
|
async def ping(ping: CL.CL_Ping_Set,api_key: APIKey = Depends(auth.get_api_key)):
|
||||||
database(f"INSERT INTO `Ping-Server` VALUES ('{datetime.now()}','{ping.name}','{ping.ipaddress}')","Stines-GmbH","")
|
database(f"INSERT INTO `Ping-Server` VALUES ('{datetime.now()}','{ping.name}','{ping.ipaddress}')","Stines-GmbH","")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue