mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-06 20:08:40 +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.Collections.Generic;
|
||||
using System.IO;
|
||||
|
@ -41,13 +42,13 @@ namespace LBPUnion.ProjectLighthouse.Controllers
|
|||
[HttpGet("users")]
|
||||
public async Task<IActionResult> GetUserAlt([FromQuery] string[] u)
|
||||
{
|
||||
List<string> tasks = new();
|
||||
List<string> serializedUsers = new();
|
||||
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));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue