Update old variable name for clarity

This commit is contained in:
LumaLivy 2021-11-08 13:41:24 -05:00
commit 45b8464d1c

View file

@ -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));
} }