Changeset 459 for TFP-WebServer/WebServer/src/WebAPI
- Timestamp:
- Aug 9, 2023, 9:41:32 PM (15 months ago)
- 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 5 5 namespace Webserver.WebAPI.APIs { 6 6 [UsedImplicitly] 7 public class Log : AbsRestApi {7 public class LogApi : AbsRestApi { 8 8 private const int maxCount = 1000; 9 9 … … 17 17 private static readonly byte[] jsonIsotimeKey = JsonWriter.GetEncodedPropertyNameWithPrefixValueSeparator ("isotime"); 18 18 private static readonly byte[] jsonUptimeKey = JsonWriter.GetEncodedPropertyNameWithPrefixValueSeparator ("uptime"); 19 19 20 public LogApi () : base ("Log") { 21 } 22 20 23 protected override void HandleRestGet (RequestContext _context) { 21 24 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 95 95 // Log info 96 96 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}"); 98 98 99 99 if (AdminWebUsers.Instance.HasUser (regData.PlatformUserId, regData.CrossPlatformUserId, out AdminWebUsers.WebUser existingUser)) { 100 100 // Remove existing username of player, only allowing one user per player 101 101 102 global::Log.Out ($"[Web] Re-registration, replacing existing username '{existingUser.Name}'");102 Log.Out ($"[Web] Re-registration, replacing existing username '{existingUser.Name}'"); 103 103 AdminWebUsers.Instance.RemoveUser (existingUser.Name); 104 104 } -
TFP-WebServer/WebServer/src/WebAPI/APIs/WorldState/Player.cs
r444 r459 93 93 ClientInfo ci = ConnectionManager.Instance.Clients.ForUserId (_nativeUserId); 94 94 if (ci == null) { 95 global::Log.Warning ($"[Web] Player.GET: ClientInfo null");95 Log.Warning ($"[Web] Player.GET: ClientInfo null"); 96 96 return; 97 97 } … … 101 101 102 102 if (entity == null) { 103 global::Log.Warning ($"[Web] Player.GET: EntityPlayer null");103 Log.Warning ($"[Web] Player.GET: EntityPlayer null"); 104 104 return; 105 105 }
Note:
See TracChangeset
for help on using the changeset viewer.