1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 07:13:58 -05:00

add client note command and feature

This commit is contained in:
RaidMax
2022-07-20 10:32:26 -05:00
parent ee5fc9383d
commit c6b0f96a69
9 changed files with 183 additions and 9 deletions

View File

@ -938,6 +938,14 @@ namespace SharedLibraryCore.Services
return clientList;
}
public async Task<string> GetClientNameById(int clientId)
{
await using var context = _contextFactory.CreateContext();
var match = await context.Clients.Select(client => new { client.CurrentAlias.Name, client.ClientId })
.FirstOrDefaultAsync(client => client.ClientId == clientId);
return match?.Name;
}
#endregion
}
}