- Timestamp:
- Aug 1, 2022, 12:54:31 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements2/MapRendering/Web/Handlers/UserStatusHandler.cs
r369 r382 1 using System.Net;2 1 using AllocsFixes.JSON; 3 2 using AllocsFixes.NetConnections.Servers.Web.API; 3 using HttpListenerRequest = SpaceWizards.HttpListener.HttpListenerRequest; 4 using HttpListenerResponse = SpaceWizards.HttpListener.HttpListenerResponse; 4 5 5 6 namespace AllocsFixes.NetConnections.Servers.Web.Handlers { 6 public class UserStatusHandler : PathHandler {7 public class UserStatusHandler : AbsHandler { 7 8 public UserStatusHandler (string _moduleName = null) : base (_moduleName) { 8 9 } 9 10 10 public override void HandleRequest ( HttpListenerRequest _req, HttpListenerResponse _resp, WebConnection _user,11 public override void HandleRequest (string _requestPath, HttpListenerRequest _req, HttpListenerResponse _resp, WebConnection _con, 11 12 int _permissionLevel) { 12 13 JSONObject result = new JSONObject (); 13 14 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)); 16 17 17 18 JSONArray perms = new JSONArray ();
Note:
See TracChangeset
for help on using the changeset viewer.