DevelopmentNodeEnvironment_MicrosoftVSCodeDependency_22NodeVersion_Bundle_Clean_Debug_ElectronProfile_EsbuildCompiler_Mountain/IPC/WindServiceHandlers/Navigation/
LabelGetBase.rs1#![allow(non_snake_case)]
2
3use serde_json::Value;
8
9pub async fn LabelGetBase(Arguments:Vec<Value>) -> Result<Value, String> {
10 let Uri = Arguments
11 .first()
12 .and_then(|V| V.as_str())
13 .ok_or("label:getBase requires uri".to_string())?;
14
15 let Base = Uri.split('/').next_back().unwrap_or(Uri);
16
17 Ok(Value::String(Base.to_owned()))
18}