fixed the launch error I was gettign
Some checks failed
gitea.arg.rip/vassago/pipeline/head There was a failure building this commit

This commit is contained in:
adam 2025-01-28 17:09:23 -05:00
parent c0cfa90874
commit 2793e6ef76
3 changed files with 17 additions and 11 deletions

2
.vscode/launch.json vendored
View File

@ -10,7 +10,7 @@
"request": "launch", "request": "launch",
"preLaunchTask": "build", "preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path. // If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/bin/Debug/net7.0/vassago.dll", "program": "${workspaceFolder}/bin/Debug/net8.0/vassago.dll",
"args": [], "args": [],
"cwd": "${workspaceFolder}", "cwd": "${workspaceFolder}",
"stopAtEntry": false, "stopAtEntry": false,

View File

@ -18,11 +18,18 @@ public class User
{ {
get get
{ {
return Accounts.Select(a => a.DisplayName).Distinct() if (Accounts?.Any() ?? false)
.MaxBy(distinctName => {
Accounts.Select(a => a.DisplayName) return Accounts.Select(a => a.DisplayName).Distinct()
.Where(selectedName => selectedName == distinctName).Count() .MaxBy(distinctName =>
); Accounts.Select(a => a.DisplayName)
.Where(selectedName => selectedName == distinctName).Count()
);
}
else
{
return $"[accountless {Id}";
}
} }
} }
} }

View File

@ -166,11 +166,10 @@ public class HomeController : Controller
} }
private void serializeUser(ref StringBuilder sb, ref List<Account> allAccounts, User currentUser) private void serializeUser(ref StringBuilder sb, ref List<Account> allAccounts, User currentUser)
{ {
sb.Append($"{{\"text\": " + Console.WriteLine(currentUser);
$"\"<a href=\\\"{Url.ActionLink(action: "Details", controller: "Users", values: new {id = currentUser.Id})}\\\">" sb.Append($"{{\"text\": \"<a href=\\\"{Url.ActionLink(action: "Details", controller: "Users", values: new {id = currentUser.Id})}\\\">");
+ currentUser.DisplayName + sb.Append(currentUser.DisplayName);
"</a>\", "); sb.Append("</a>\", ");
// \"{currentUser.DisplayName}\", ");
var ownedAccounts = allAccounts.Where(a => a.IsUser == currentUser); var ownedAccounts = allAccounts.Where(a => a.IsUser == currentUser);
sb.Append("nodes: ["); sb.Append("nodes: [");
sb.Append($"{{\"text\": \"owned accounts:\", \"expanded\":true, \"nodes\": ["); sb.Append($"{{\"text\": \"owned accounts:\", \"expanded\":true, \"nodes\": [");