include id in task created response

This commit is contained in:
aaron-jack-manning 2022-08-21 12:19:39 +10:00
parent bea2772b64
commit 9c008e4d2c

View File

@ -159,7 +159,7 @@ fn program() -> Result<(), error::Error> {
match command { match command {
New { name, info, tags, dependencies, priority } => { New { name, info, tags, dependencies, priority } => {
let task = tasks::Task::new(name, info, tags, dependencies, priority, vault_folder, &mut state)?; let task = tasks::Task::new(name, info, tags, dependencies, priority, vault_folder, &mut state)?;
println!("Created task {}", colour::task_name(&task.data.name)); println!("Created task {} (ID: {})", colour::task_name(&task.data.name), colour::id(&task.data.id.to_string()));
}, },
Delete { id } => { Delete { id } => {
tasks::Task::delete_by_id(id, vault_folder)?; tasks::Task::delete_by_id(id, vault_folder)?;