diff --git a/Controllers/Cli.cs b/Controllers/Cli.cs index 601e437..bfcfe89 100644 --- a/Controllers/Cli.cs +++ b/Controllers/Cli.cs @@ -1,6 +1,5 @@ using Shadow.Data; using Shadow.Entities; -using System.Security; namespace Shadow.Controllers; public class Cli @@ -91,6 +90,8 @@ public class Cli while (username is null || username == String.Empty) username = ReadName(" Please enter a username: "); } + else + username = args[1]; // Check if user by this name exists in DB User? foundUser = db.Users @@ -141,6 +142,8 @@ public class Cli while (username is null || username == String.Empty) username = ReadName(" Please enter a username: "); } + else + username = args[1]; // Check if user by this name exists in DB User? foundUser = db.Users @@ -185,6 +188,8 @@ public class Cli while (username is null || username == String.Empty) username = ReadName(" Please enter the username: "); } + else + username = args[1]; // Check if user by this name exists in DB User? foundUser = db.Users @@ -283,6 +288,7 @@ public class Cli while (!exit) { if (input is not null && input.Length > 0) + { if (input.ToLower().StartsWith("y")) { response = true; @@ -293,11 +299,12 @@ public class Cli response = false; exit = true; } - else if (default_value is not null) - { - response = (bool)default_value; - exit = true; - } + } + else if (default_value is not null) + { + response = (bool)default_value; + exit = true; + } } return response; } diff --git a/Properties/launchSettings.json b/Properties/launchSettings.json index 4994d23..bb4de99 100644 --- a/Properties/launchSettings.json +++ b/Properties/launchSettings.json @@ -29,4 +29,4 @@ } }, "$schema": "https://json.schemastore.org/launchsettings.json" -} +} \ No newline at end of file