feat: add bulk option to todo done
This commit is contained in:
@@ -65,9 +65,11 @@ async fn list(ctx: &Ctx<'_>, args: ListArgs) -> Result<()> {
|
||||
}
|
||||
|
||||
async fn done(ctx: &Ctx<'_>, args: DoneArgs) -> Result<()> {
|
||||
let todo = db::complete_todo(ctx.pool, args.id).await?;
|
||||
print!("{} ", "done:".green().bold());
|
||||
print_todo(&todo);
|
||||
for id in args.id {
|
||||
let todo = db::complete_todo(ctx.pool, id).await?;
|
||||
print!("{} ", "done:".green().bold());
|
||||
print_todo(&todo);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user