MCPcopy Create free account
hub / github.com/Botloader/botloader / logout

Function logout

cmd/blcmd/src/main.rs:138–150  ·  view source on GitHub ↗
(ctx: Context)

Source from the content-addressed store, hash-verified

136}
137
138async fn logout(ctx: Context) -> anyhow::Result<()> {
139 if ctx.config.api_token.is_empty() {
140 println!("You're not logged in");
141 return Ok(());
142 }
143
144 let mut new_config = ctx.config;
145 new_config.api_token = String::new();
146 confy::store(APP_NAME, &new_config)?;
147
148 println!("Removed your login details");
149 Ok(())
150}

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected