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

@ -46,7 +46,7 @@ pub async fn subcommand(arg: &ArgMatches, pool: DbPool) -> Result<(), String>{
create_dir(&path).await.map_err(|e| format!("failed to create the config folder, reason : {}", e))?;
let mut file = File::create(path.to_string() + "env").await.map_err(|e| format!("failed to create .env file, reason {}", e))?;
file.write_all(env_settings::args_to_env(arg).as_bytes()).await.map_err(|e| format!("Failed to write to env file, reason : {}", e))?;
file.write_all(env_settings::args_to_env(arg, true).as_bytes()).await.map_err(|e| format!("Failed to write to env file, reason : {}", e))?;
create_dir(path.to_string() + "server").await.map_err(|e| format!("failed to create server subfolder, reason: {}", e))?;