Ignore:
Timestamp:
Aug 6, 2022, 11:32:32 PM (2 years ago)
Author:
alloc
Message:

Big refactoring in Web to pass around a Context instead of a bunch of individual arguments all the time

File:
1 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements2/MapRendering/Web/API/GetPlayerInventories.cs

    r383 r387  
    22using AllocsFixes.JSON;
    33using AllocsFixes.PersistentData;
    4 using HttpListenerRequest = SpaceWizards.HttpListener.HttpListenerRequest;
    5 using HttpListenerResponse = SpaceWizards.HttpListener.HttpListenerResponse;
    64
    75namespace AllocsFixes.NetConnections.Servers.Web.API {
    8         public class GetPlayerInventories : WebAPI {
    9                 public override void HandleRequest (HttpListenerRequest _req, HttpListenerResponse _resp, WebConnection _user,
    10                         int _permissionLevel) {
    11                         GetPlayerInventory.GetInventoryArguments (_req, out bool showIconColor, out bool showIconName);
     6        public class GetPlayerInventories : AbsWebAPI {
     7                public override void HandleRequest (RequestContext _context) {
     8                        GetPlayerInventory.GetInventoryArguments (_context.Request, out bool showIconColor, out bool showIconName);
    129
    1310                        JSONArray AllInventoriesResult = new JSONArray ();
     
    2522                        }
    2623
    27                         WriteJSON (_resp, AllInventoriesResult);
     24                        WebUtils.WriteJson (_context.Response, AllInventoriesResult);
    2825                }
    2926        }
Note: See TracChangeset for help on using the changeset viewer.