Ignore:
Timestamp:
Aug 1, 2022, 12:54:31 PM (2 years ago)
Author:
alloc
Message:

Switched to use SpaceWizards.HttpListener

File:
1 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements2/MapRendering/Web/Handlers/UserStatusHandler.cs

    r369 r382  
    1 using System.Net;
    21using AllocsFixes.JSON;
    32using AllocsFixes.NetConnections.Servers.Web.API;
     3using HttpListenerRequest = SpaceWizards.HttpListener.HttpListenerRequest;
     4using HttpListenerResponse = SpaceWizards.HttpListener.HttpListenerResponse;
    45
    56namespace AllocsFixes.NetConnections.Servers.Web.Handlers {
    6         public class UserStatusHandler : PathHandler {
     7        public class UserStatusHandler : AbsHandler {
    78                public UserStatusHandler (string _moduleName = null) : base (_moduleName) {
    89                }
    910
    10                 public override void HandleRequest (HttpListenerRequest _req, HttpListenerResponse _resp, WebConnection _user,
     11                public override void HandleRequest (string _requestPath, HttpListenerRequest _req, HttpListenerResponse _resp, WebConnection _con,
    1112                        int _permissionLevel) {
    1213                        JSONObject result = new JSONObject ();
    1314
    14                         result.Add ("loggedin", new JSONBoolean (_user != null));
    15                         result.Add ("username", new JSONString (_user != null ? _user.UserId.ToString () : string.Empty));
     15                        result.Add ("loggedin", new JSONBoolean (_con != null));
     16                        result.Add ("username", new JSONString (_con != null ? _con.UserId.ToString () : string.Empty));
    1617
    1718                        JSONArray perms = new JSONArray ();
Note: See TracChangeset for help on using the changeset viewer.