Spaces:
Sleeping
Sleeping
File size: 480 Bytes
b7f11de |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
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}
|