Skip to content

Commit a529a13

Browse files
authored
Add API field and integration config entry for WebsiteLogoUrl (#721)
This PR resolves #237. Very basic API implementation, doesn't default to anything currently. Let me know if it should.
2 parents 7175864 + c0b134c commit a529a13

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

Refresh.GameServer/Configuration/IntegrationConfig.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace Refresh.GameServer.Configuration;
77
/// </summary>
88
public class IntegrationConfig : Config
99
{
10-
public override int CurrentConfigVersion => 6;
10+
public override int CurrentConfigVersion => 7;
1111
public override int Version { get; set; }
1212
protected override void Migrate(int oldVer, dynamic oldConfig)
1313
{
@@ -69,4 +69,6 @@ protected override void Migrate(int oldVer, dynamic oldConfig)
6969
#endregion
7070

7171
public string? GrafanaDashboardUrl { get; set; }
72+
73+
public string WebsiteLogoUrl { get; set; } = "https://github.com/LittleBigRefresh/Branding/blob/main/icons/refresh_transparent.svg";
7274
}

Refresh.GameServer/Endpoints/ApiV3/DataTypes/Response/ApiInstanceResponse.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ public class ApiInstanceResponse : IApiResponse
4848
public required bool MaintenanceModeEnabled { get; set; }
4949
public required string? GrafanaDashboardUrl { get; set; }
5050

51+
public required string WebsiteLogoUrl { get; set; }
52+
5153
public required ApiContactInfoResponse ContactInfo { get; set; }
5254

5355
public required ApiContestResponse? ActiveContest { get; set; }

Refresh.GameServer/Endpoints/ApiV3/InstanceApiEndpoints.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ public ApiResponse<ApiInstanceResponse> GetInstanceInformation(RequestContext co
6666
gameConfig,
6767
richConfig), dataContext)!,
6868
GrafanaDashboardUrl = integrationConfig.GrafanaDashboardUrl,
69+
WebsiteLogoUrl = integrationConfig.WebsiteLogoUrl,
6970

7071
ContactInfo = new ApiContactInfoResponse
7172
{

0 commit comments

Comments
 (0)