This commit is contained in:
2025-10-29 09:36:37 +04:00
parent 9c8bcbff0c
commit 05c789da7e
36 changed files with 108 additions and 108 deletions

View File

@@ -37,7 +37,7 @@ pub fn get(args ArgsGet) !&MyceliumRPC {
data := r.hget('context:mycelium_rpc', args.name)!
if data.len == 0 {
print_backtrace()
return error('MyceliumRPC with name: mycelium_rpc does not exist, prob bug.')
return error('MyceliumRPC with name: ${args.name} does not exist, prob bug.')
}
mut obj := json.decode(MyceliumRPC, data)!
set_in_mem(obj)!
@@ -46,14 +46,14 @@ pub fn get(args ArgsGet) !&MyceliumRPC {
new(args)!
} else {
print_backtrace()
return error("MyceliumRPC with name 'mycelium_rpc' does not exist")
return error("MyceliumRPC with name '${args.name}' does not exist")
}
}
return get(name: args.name)! // no longer from db nor create
}
return mycelium_rpc_global[args.name] or {
print_backtrace()
return error('could not get config for mycelium_rpc with name:mycelium_rpc')
return error('could not get config for mycelium_rpc with name:${args.name}')
}
}