MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / handle_show

Function handle_show

nodedb/src/control/server/native/dispatch/session_ops.rs:21–37  ·  view source on GitHub ↗
(ctx: &DispatchCtx<'_>, seq: u64, key: &str)

Source from the content-addressed store, hash-verified

19}
20
21pub(crate) fn handle_show(ctx: &DispatchCtx<'_>, seq: u64, key: &str) -> NativeResponse {
22 let value = ctx
23 .sessions
24 .get_parameter(ctx.peer_addr, &key.to_lowercase())
25 .unwrap_or_default();
26 NativeResponse {
27 seq,
28 status: nodedb_types::protocol::ResponseStatus::Ok,
29 columns: Some(vec!["setting".into()]),
30 rows: Some(vec![vec![Value::String(value)]]),
31 rows_affected: None,
32 watermark_lsn: 0,
33 error: None,
34 auth: None,
35 warnings: Vec::new(),
36 }
37}
38
39pub(crate) fn handle_reset(ctx: &DispatchCtx<'_>, seq: u64, key: &str) -> NativeResponse {
40 ctx.sessions

Callers 1

handle_requestMethod · 0.85

Calls 1

get_parameterMethod · 0.80

Tested by

no test coverage detected