Changeset 454 for binary-improvements/MapRendering/API/GetWebUIUpdates.cs
- Timestamp:
- Jul 28, 2023, 8:42:10 PM (16 months ago)
- Location:
- binary-improvements/MapRendering/API
- Files:
-
- 1 added
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/MapRendering/API/GetWebUIUpdates.cs
r453 r454 1 using System.Net;2 1 using AllocsFixes.JSON; 3 2 using AllocsFixes.LiveData; 3 using Webserver; 4 using Webserver.WebAPI; 4 5 5 namespace AllocsFixes.NetConnections.Servers.Web.API { 6 public class GetWebUIUpdates : WebAPI { 7 public override void HandleRequest (HttpListenerRequest _req, HttpListenerResponse _resp, WebConnection _user, 8 int _permissionLevel) { 6 namespace AllocsFixes.WebAPIs { 7 public class GetWebUIUpdates : AbsWebAPI { 8 public override void HandleRequest (RequestContext _context) { 9 9 int latestLine; 10 if (_ req.QueryString ["latestLine"] == null ||11 !int.TryParse (_ req.QueryString ["latestLine"], out latestLine)) {10 if (_context.Request.QueryString ["latestLine"] == null || 11 !int.TryParse (_context.Request.QueryString ["latestLine"], out latestLine)) { 12 12 latestLine = 0; 13 13 } … … 27 27 result.Add ("newlogs", new JSONNumber (LogBuffer.Instance.LatestLine - latestLine)); 28 28 29 WriteJSON (_resp, result);29 LegacyApiHelper.WriteJSON (_context.Response, result); 30 30 } 31 31
Note:
See TracChangeset
for help on using the changeset viewer.