Spaces:
Sleeping
Sleeping
| from components.mongodbconnection import provideClient | |
| mc=provideClient() | |
| db=mc["x402ify_db"] | |
| coll=db["x402ify_col"] | |
| def UpdateDynamicEndpoint(owner,tag,newendpoint): | |
| try: | |
| coll.find_one_and_update( | |
| {"owner": owner}, | |
| { "$set": {"dynamicendpoints.$[elem].endpoint": newendpoint} | |
| }, | |
| array_filters=[{"elem.endpoint_linker": tag}], | |
| ) | |
| return {"status":True} | |
| except Exception as e: | |
| return {"status":False} | |