Skip to content

Commit

Permalink
Adding BotEnabled property
Browse files Browse the repository at this point in the history
  • Loading branch information
frasermolyneux committed Jan 6, 2024
1 parent 95ccfd2 commit 47676e3
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ public enum GameServerFilter
{
LiveTrackingEnabled,
PortalServerListEnabled,
BannerServerListEnabled
BannerServerListEnabled,
BotEnabled
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ public CreateGameServerDto(string title, GameType gameType, string hostname, int
[JsonProperty]
public string? HtmlBanner { get; set; }

[JsonProperty]
public bool BotEnabled { get; set; }

[JsonProperty]
public bool BannerServerListEnabled { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ public EditGameServerDto(Guid gameServerId)
[JsonProperty]
public string? HtmlBanner { get; set; }

[JsonProperty]
public bool? BotEnabled { get; set; }

[JsonProperty]
public bool? BannerServerListEnabled { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ public class GameServerDto
[JsonProperty]
public string? HtmlBanner { get; internal set; }

[JsonProperty]
public bool BotEnabled { get; set; }

[JsonProperty]
public bool BannerServerListEnabled { get; internal set; }

Expand Down
3 changes: 3 additions & 0 deletions src/repository-webapi/Controllers/GameServersController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,9 @@ private IQueryable<GameServer> ApplyFilter(IQueryable<GameServer> query, GameTyp
case GameServerFilter.LiveTrackingEnabled:
query = query.Where(s => s.LiveTrackingEnabled).AsQueryable();
break;
case GameServerFilter.BotEnabled:
query = query.Where(s => s.BotEnabled).AsQueryable();
break;
}

return query;
Expand Down

0 comments on commit 47676e3

Please sign in to comment.