add edit, ls and remove cli commands

This commit is contained in:
2026-06-06 17:20:15 +02:00
parent 25d7a6ffd1
commit e162ef10a3
7 changed files with 164 additions and 16 deletions

View File

@ -6,7 +6,7 @@
/* By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/05/29 21:22:17 by tomoron #+# #+# */
/* Updated: 2026/06/05 17:48:58 by tomoron ### ########.fr */
/* Updated: 2026/06/06 15:37:52 by tomoron ### ########.fr */
/* */
/* ************************************************************************** */
@ -66,6 +66,9 @@ async fn main() -> Result<(), String> {
match arg.subcommand() {
Some(("serverMode", _)) => { mc_socket_listen(pool).await.map_err(|_| "socket error".to_string())?; },
Some(("add", sub_matches)) => { add::subcommand(sub_matches, pool).await?; },
Some(("remove", sub_matches)) => { remove::subcommand(sub_matches, pool).await?; },
Some(("ls", sub_matches)) => { ls::subcommand(sub_matches, pool).await?; },
Some(("edit", sub_matches)) => { edit::subcommand(sub_matches, pool).await?; },
_ => {panic!("subcommand not implemented")}
}
Ok(())