login to start

This commit is contained in:
2026-06-10 13:19:10 +02:00
parent 17032a1940
commit 35ac5453d9
8 changed files with 68 additions and 30 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/09 17:04:32 by tomoron ### ########.fr */
/* Updated: 2026/06/10 13:16:50 by tomoron ### ########.fr */
/* */
/* ************************************************************************** */
@ -74,14 +74,14 @@ async fn main() -> Result<(), String> {
let docker = Docker::connect_with_defaults().expect("Failed to connect to local docker");
match arg.subcommand() {
Some(("serverMode", _)) => { mc_socket_listen(pool).await.map_err(|_| "socket error".to_string())?; },
Some(("serverMode", _)) => { mc_socket_listen(pool, docker).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(("remove", sub_matches)) => { remove::subcommand(sub_matches, &pool, &docker).await?; },
Some(("ls", sub_matches)) => { ls::subcommand(sub_matches, pool).await?; },
Some(("edit", sub_matches)) => { edit::subcommand(sub_matches, pool).await?; },
Some(("start", sub_matches)) => { start::subcommand(sub_matches, &pool, docker).await?; },
Some(("stop", sub_matches)) => { stop::subcommand(sub_matches, &pool, docker).await?; },
Some(("start", sub_matches)) => { start::subcommand(sub_matches, &pool, &docker).await?; },
Some(("stop", sub_matches)) => { stop::subcommand(sub_matches, &pool, &docker).await?; },
_ => {panic!("subcommand not implemented")}
}
Ok(())