forked from adam/discord-bot-shtik
fixed the launch error I was gettign
Some checks failed
gitea.arg.rip/vassago/pipeline/head There was a failure building this commit
Some checks failed
gitea.arg.rip/vassago/pipeline/head There was a failure building this commit
This commit is contained in:
parent
c0cfa90874
commit
2793e6ef76
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@ -10,7 +10,7 @@
|
||||
"request": "launch",
|
||||
"preLaunchTask": "build",
|
||||
// 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": [],
|
||||
"cwd": "${workspaceFolder}",
|
||||
"stopAtEntry": false,
|
||||
|
@ -17,6 +17,8 @@ public class User
|
||||
public string DisplayName
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Accounts?.Any() ?? false)
|
||||
{
|
||||
return Accounts.Select(a => a.DisplayName).Distinct()
|
||||
.MaxBy(distinctName =>
|
||||
@ -24,5 +26,10 @@ public class User
|
||||
.Where(selectedName => selectedName == distinctName).Count()
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
return $"[accountless {Id}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -166,11 +166,10 @@ public class HomeController : Controller
|
||||
}
|
||||
private void serializeUser(ref StringBuilder sb, ref List<Account> allAccounts, User currentUser)
|
||||
{
|
||||
sb.Append($"{{\"text\": " +
|
||||
$"\"<a href=\\\"{Url.ActionLink(action: "Details", controller: "Users", values: new {id = currentUser.Id})}\\\">"
|
||||
+ currentUser.DisplayName +
|
||||
"</a>\", ");
|
||||
// \"{currentUser.DisplayName}\", ");
|
||||
Console.WriteLine(currentUser);
|
||||
sb.Append($"{{\"text\": \"<a href=\\\"{Url.ActionLink(action: "Details", controller: "Users", values: new {id = currentUser.Id})}\\\">");
|
||||
sb.Append(currentUser.DisplayName);
|
||||
sb.Append("</a>\", ");
|
||||
var ownedAccounts = allAccounts.Where(a => a.IsUser == currentUser);
|
||||
sb.Append("nodes: [");
|
||||
sb.Append($"{{\"text\": \"owned accounts:\", \"expanded\":true, \"nodes\": [");
|
||||
|
Loading…
Reference in New Issue
Block a user