Ignore:
Timestamp:
Aug 9, 2023, 9:41:32 PM (15 months ago)
Author:
alloc
Message:

Updated to dashboard/marker files 0.8.0
Added initial OpenAPI support

Location:
TFP-WebServer/WebServer/src/WebAPI
Files:
5 added
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • TFP-WebServer/WebServer/src/WebAPI/APIs/LogApi.cs

    r458 r459  
    55namespace Webserver.WebAPI.APIs {
    66        [UsedImplicitly]
    7         public class Log : AbsRestApi {
     7        public class LogApi : AbsRestApi {
    88                private const int maxCount = 1000;
    99
     
    1717                private static readonly byte[] jsonIsotimeKey = JsonWriter.GetEncodedPropertyNameWithPrefixValueSeparator ("isotime");
    1818                private static readonly byte[] jsonUptimeKey = JsonWriter.GetEncodedPropertyNameWithPrefixValueSeparator ("uptime");
    19                
     19
     20                public LogApi () : base ("Log") {
     21                }
     22
    2023                protected override void HandleRestGet (RequestContext _context) {
    2124                        if (_context.Request.QueryString ["count"] == null || !int.TryParse (_context.Request.QueryString ["count"], out int count)) {
  • TFP-WebServer/WebServer/src/WebAPI/APIs/Permissions/RegisterUser.cs

    r453 r459  
    9595                        // Log info
    9696                        string crossplatformidString = regData.CrossPlatformUserId == null ? "" : $", crossplatform ID {regData.CrossPlatformUserId.CombinedString}";
    97                         global::Log.Out ($"[Web] User registered: Username '{username}' for platform ID {regData.PlatformUserId.CombinedString}{crossplatformidString}");
     97                        Log.Out ($"[Web] User registered: Username '{username}' for platform ID {regData.PlatformUserId.CombinedString}{crossplatformidString}");
    9898
    9999                        if (AdminWebUsers.Instance.HasUser (regData.PlatformUserId, regData.CrossPlatformUserId, out AdminWebUsers.WebUser existingUser)) {
    100100                                // Remove existing username of player, only allowing one user per player
    101101
    102                                 global::Log.Out ($"[Web] Re-registration, replacing existing username '{existingUser.Name}'");
     102                                Log.Out ($"[Web] Re-registration, replacing existing username '{existingUser.Name}'");
    103103                                AdminWebUsers.Instance.RemoveUser (existingUser.Name);
    104104                        }
  • TFP-WebServer/WebServer/src/WebAPI/APIs/WorldState/Player.cs

    r444 r459  
    9393                        ClientInfo ci = ConnectionManager.Instance.Clients.ForUserId (_nativeUserId);
    9494                        if (ci == null) {
    95                                 global::Log.Warning ($"[Web] Player.GET: ClientInfo null");
     95                                Log.Warning ($"[Web] Player.GET: ClientInfo null");
    9696                                return;
    9797                        }
     
    101101
    102102                        if (entity == null) {
    103                                 global::Log.Warning ($"[Web] Player.GET: EntityPlayer null");
     103                                Log.Warning ($"[Web] Player.GET: EntityPlayer null");
    104104                                return;
    105105                        }
Note: See TracChangeset for help on using the changeset viewer.