Skip to content

Commit

Permalink
Implement Event Deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
isiko committed Jul 3, 2024
1 parent 8659a7a commit 04a67d1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cli-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ This Project aims to creat a simple to use Commandline application that interfac
* [ ] ingredient <ingredient_ref>
* [x] reciepe <reciepe_ref>
* [x] user <user_ref>
* [ ] event <event_ref>
* [x] event <event_ref>
* [ ] edit
* [ ] ingredient <ingredient_ref>
* [x] name <name>
Expand Down
8 changes: 6 additions & 2 deletions cli-client/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -613,9 +613,13 @@ async fn main() {
.get_event_from_string_reference(_event_ref.to_string())
.await;

if let Some(_event) = event {
if let Some(event) = event {
// There currently isn't a method for deleting an event
todo!();
let query = food_base.delete_event(event.event_id).await;
match query {
Ok(_) => {}
Err(error) => println!("Error: {}", error),
}
} else {
println!("Event not found");
}
Expand Down

0 comments on commit 04a67d1

Please sign in to comment.