mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-09 05:18:47 +00:00
Update old variable name for clarity
This commit is contained in:
parent
f93c9c5e32
commit
45b8464d1c
1 changed files with 4 additions and 3 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
#nullable enable
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
@ -41,13 +42,13 @@ namespace LBPUnion.ProjectLighthouse.Controllers
|
||||||
[HttpGet("users")]
|
[HttpGet("users")]
|
||||||
public async Task<IActionResult> GetUserAlt([FromQuery] string[] u)
|
public async Task<IActionResult> GetUserAlt([FromQuery] string[] u)
|
||||||
{
|
{
|
||||||
List<string> tasks = new();
|
List<string> serializedUsers = new();
|
||||||
foreach (string userId in u)
|
foreach (string userId in u)
|
||||||
{
|
{
|
||||||
tasks.Add(await this.GetSerializedUser(userId));
|
serializedUsers.Add(await this.GetSerializedUser(userId));
|
||||||
}
|
}
|
||||||
|
|
||||||
string serialized = tasks.Aggregate(string.Empty, (current, u) => u == null ? current : current + u);
|
string serialized = serializedUsers.Aggregate(string.Empty, (current, u) => u == null ? current : current + u);
|
||||||
|
|
||||||
return this.Ok(LbpSerializer.StringElement("users", serialized));
|
return this.Ok(LbpSerializer.StringElement("users", serialized));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue