Skip to content

Commit 2c4f442

Browse files
committed
fix: build broken
1 parent 0b961d6 commit 2c4f442

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

Intersect.Server/Web/RestApi/Routes/V1/GuildController.cs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,12 @@ public IActionResult Kick(Guid guildId, LookupKey lookupKey)
158158
var guild = Guild.LoadGuild(guildId);
159159
if (guild == null)
160160
{
161-
return NotFound($@"Guild does not exist.");
161+
return NotFound($@"Guild does not exist with id {guildId}.");
162162
}
163163

164-
var (_, player) = Player.Fetch(lookupKey);
165-
if (player == null)
164+
if (!Player.TryFetch(lookupKey, out var _, out var player))
166165
{
167-
return NotFound($@"Player not found.");
166+
return NotFound($@"Player not found with lookup key {lookupKey}.");
168167
}
169168

170169
if (!guild.IsMember(player.Id))
@@ -200,13 +199,12 @@ public IActionResult SetRank(Guid guildId, LookupKey lookupKey, [FromBody] Guild
200199
var guild = Guild.LoadGuild(guildId);
201200
if (guild == null)
202201
{
203-
return NotFound($@"Guild does not exist.");
202+
return NotFound($@"Guild does not exist with id {guildId}.");
204203
}
205204

206-
var (_, player) = Player.Fetch(lookupKey);
207-
if (player == null)
205+
if (!Player.TryFetch(lookupKey, out var _, out var player))
208206
{
209-
return NotFound($@"Player not found.");
207+
return NotFound($@"Player not found with lookup key {lookupKey}.");
210208
}
211209

212210
if (!guild.IsMember(player.Id))
@@ -240,10 +238,9 @@ public IActionResult Transfer(Guid guildId, LookupKey lookupKey)
240238
return NotFound($@"No guild found with id {guildId}");
241239
}
242240

243-
var (_, player) = Player.Fetch(lookupKey);
244-
if (player == null)
241+
if (!Player.TryFetch(lookupKey, out var _, out var player))
245242
{
246-
return BadRequest($@"Player not found.");
243+
return BadRequest($@"Player not found with lookup key {lookupKey}.");
247244
}
248245

249246
if (!guild.IsMember(player.Id))

0 commit comments

Comments
 (0)