Skip to content

Commit

Permalink
ActivityEndpoints: Add LBP3 recent activity endpoint (#578)
Browse files Browse the repository at this point in the history
Also contains a minor doc fix

Closes #581
  • Loading branch information
jvyden authored Jul 24, 2024
2 parents 3c8eba8 + 2c02483 commit 5e1ce50
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion Refresh.GameServer/Configuration/GameServerConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ protected override void Migrate(int oldVer, dynamic oldConfig) {}
public string WebExternalUrl { get; set; } = "https://refresh.example.com";
/// <summary>
/// The base URL that LBP3 uses to grab config files like `network_settings.nws`.
/// URL must point to a HTTPS capable server with TLSv1.2 connectivity, the game will automatically correct HTTP to HTTPS.
/// </summary>
public string GameConfigStorageUrl { get; set; } = "https://refresh.example.com/lbp";
public bool AllowInvalidTextureGuids { get; set; } = false;
Expand Down
5 changes: 2 additions & 3 deletions Refresh.GameServer/Endpoints/Game/ActivityEndpoints.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
using System.Xml.Serialization;
using Bunkum.Core;
using Bunkum.Core.Endpoints;
using Bunkum.Core.Endpoints.Debugging;
using Bunkum.Core.Responses;
using Bunkum.Listener.Protocol;
using Bunkum.Protocols.Http;
using Refresh.GameServer.Authentication;
using Refresh.GameServer.Database;
using Refresh.GameServer.Endpoints.Game.Levels.FilterSettings;
using Refresh.GameServer.Extensions;
using Refresh.GameServer.Services;
using Refresh.GameServer.Time;
using Refresh.GameServer.Types.Activity;
using Refresh.GameServer.Types.Data;
Expand All @@ -23,6 +21,7 @@ namespace Refresh.GameServer.Endpoints.Game;
public class ActivityEndpoints : EndpointGroup
{
[GameEndpoint("stream", ContentType.Xml)]
[GameEndpoint("stream", ContentType.Xml, HttpMethods.Post)]
[NullStatusCode(BadRequest)]
[MinimumRole(GameUserRole.Restricted)]
public ActivityPage? GetRecentActivity(RequestContext context, GameDatabaseContext database, GameUser? user,
Expand Down

0 comments on commit 5e1ce50

Please sign in to comment.