- Timestamp:
 - Jul 28, 2023, 8:42:10 PM (2 years ago)
 - Location:
 - binary-improvements/MapRendering/API
 - Files:
 - 
      
- 1 added
 - 1 moved
 
- 
          
  . (added)
 - 
          
  GetPlayersLocation.cs (moved) (moved from binary-improvements/MapRendering/Web/API/GetPlayersLocation.cs ) (2 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
binary-improvements/MapRendering/API/GetPlayersLocation.cs
r453 r454 1 1 using System.Collections.Generic; 2 using System.Net;3 2 using AllocsFixes.JSON; 4 3 using AllocsFixes.PersistentData; 4 using Webserver; 5 using Webserver.Permissions; 6 using Webserver.WebAPI; 5 7 6 namespace AllocsFixes.NetConnections.Servers.Web.API { 7 public class GetPlayersLocation : WebAPI { 8 public override void HandleRequest (HttpListenerRequest _req, HttpListenerResponse _resp, WebConnection _user, 9 int _permissionLevel) { 8 namespace AllocsFixes.WebAPIs { 9 public class GetPlayersLocation : AbsWebAPI { 10 public override void HandleRequest (RequestContext _context) { 10 11 AdminTools admTools = GameManager.Instance.adminTools; 11 PlatformUserIdentifierAbs userId = _ user?.UserId;12 PlatformUserIdentifierAbs userId = _context.Connection?.UserId; 12 13 13 14 bool listOffline = false; 14 if (_ req.QueryString ["offline"] != null) {15 bool.TryParse (_ req.QueryString ["offline"], out listOffline);15 if (_context.Request.QueryString ["offline"] != null) { 16 bool.TryParse (_context.Request.QueryString ["offline"], out listOffline); 16 17 } 17 18 18 bool bViewAll = WebConnection.CanViewAllPlayers (_permissionLevel);19 bool bViewAll = PermissionUtils.CanViewAllPlayers (_context.PermissionLevel); 19 20 20 21 JSONArray playersJsResult = new JSONArray (); … … 57 58 } 58 59 59 WriteJSON (_resp, playersJsResult);60 LegacyApiHelper.WriteJSON (_context.Response, playersJsResult); 60 61 } 61 62 }  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  ![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)