Fix zaprit suggestion

This commit is contained in:
FeTetra 2025-03-08 12:46:58 -05:00
commit ed9c1464a1

View file

@ -37,10 +37,10 @@ public class UserController : ControllerBase
[HttpGet("user/{username}")] [HttpGet("user/{username}")]
public async Task<IActionResult> GetUser(string username) public async Task<IActionResult> GetUser(string username)
{ {
UserEntity? targetUser = await this.database.Users.FirstOrDefaultAsync(u => u.Username == username); UserEntity? user = await this.database.Users.FirstOrDefaultAsync(u => u.Username == username);
if (targetUser == null) return this.NotFound(); if (user == null) return this.NotFound();
return this.Ok(GameUser.CreateFromEntity(targetUser, this.GetToken().GameVersion)); return this.Ok(GameUser.CreateFromEntity(user, this.GetToken().GameVersion));
} }
[HttpGet("users")] [HttpGet("users")]