chore: remove unused trello boards list command
This commit is contained in:
parent
ae9fff4249
commit
959613919e
2 changed files with 0 additions and 35 deletions
|
@ -1,34 +0,0 @@
|
|||
//
|
||||
use clap::Parser;
|
||||
|
||||
use crate::{execute::Execute, p, FullCtx};
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
pub(crate) enum TrelloBoardCommand {
|
||||
List {
|
||||
#[clap(long, action = clap::ArgAction::SetTrue)]
|
||||
dump: bool,
|
||||
},
|
||||
}
|
||||
|
||||
impl Execute for TrelloBoardCommand {
|
||||
async fn execute(self, ctx: FullCtx) -> color_eyre::Result<()> {
|
||||
match self {
|
||||
Self::List { dump } => list(ctx, dump).await,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) async fn list(ctx: FullCtx, dump: bool) -> color_eyre::Result<()> {
|
||||
let api_result = ctx.trello_client().boards().await;
|
||||
if dump {
|
||||
p!(ctx.prt, "{}", api_result.text);
|
||||
} else {
|
||||
let mut boards = api_result.result?;
|
||||
boards.sort_by(|a, b| a.name.cmp(&b.name));
|
||||
boards.into_iter().for_each(|board| {
|
||||
p!(ctx.prt, "{}:{}", board.id, board.name);
|
||||
});
|
||||
}
|
||||
Ok(())
|
||||
}
|
|
@ -20,7 +20,6 @@ use crate::{
|
|||
|
||||
pub(crate) mod attachment;
|
||||
pub(crate) mod board;
|
||||
pub(crate) mod boards;
|
||||
pub(crate) mod card;
|
||||
pub(crate) mod client;
|
||||
pub(crate) mod member;
|
||||
|
|
Loading…
Reference in a new issue