Spaces:
Sleeping
Sleeping
| 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":[]} |