fix: add comments, remove whitespace

This commit is contained in:
Dollan 2024-04-12 17:32:18 +02:00
parent 01455f599b
commit a2fdc0feed
No known key found for this signature in database

View file

@ -383,10 +383,6 @@ public partial class CS2_SimpleAdmin
new { address, hostname }); new { address, hostname });
} }
(int? serverId, string? groupIds) = await connection.QueryFirstAsync<(int?, string?)>( (int? serverId, string? groupIds) = await connection.QueryFirstAsync<(int?, string?)>(
"SELECT `id`, `group_ids` FROM `sa_servers` WHERE `address` = @address", "SELECT `id`, `group_ids` FROM `sa_servers` WHERE `address` = @address",
new { address }); new { address });
@ -394,6 +390,7 @@ public partial class CS2_SimpleAdmin
ServerId = serverId; ServerId = serverId;
if (groupIds != null && groupIds.Length > 0) if (groupIds != null && groupIds.Length > 0)
{ {
// Split the group ids by comma and parse them to integers
GroupIds = groupIds?.Split(',').Select(int.Parse).ToArray(); GroupIds = groupIds?.Split(',').Select(int.Parse).ToArray();
} }
else else