velocity / components /dynamicendpointscheck.py
Junaidb's picture
Update components/dynamicendpointscheck.py
3f41dac verified
raw
history blame contribute delete
509 Bytes
from components.mongodbconnection import provideClient
mc=provideClient()
db=mc["x402ify_db"]
coll=db["x402ify_col"]
def checkDynamicEndpoints(owner):
document=coll.find_one({"owner":owner})
if document:
endpoints=document["dynamicendpoints"]
if len(endpoints) == 0:
return {"status":False,"dynamicendpoints":[]}
else:
return {"status":True,"dynamicendpoints":endpoints}
else:
return {"status":False,"dynamicendpoints":[]}