- Timestamp:
- Sep 4, 2018, 1:00:48 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/MapRendering/Web/API/GetPlayerInventory.cs
r321 r325 1 using System.Collections.Generic; 2 using System.Net; 1 3 using AllocsFixes.JSON; 2 4 using AllocsFixes.PersistentData; 3 using System;4 using System.Collections.Generic;5 using System.Net;6 5 7 namespace AllocsFixes.NetConnections.Servers.Web.API 8 { 6 namespace AllocsFixes.NetConnections.Servers.Web.API { 9 7 public class GetPlayerInventory : WebAPI { 10 11 public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user,int permissionLevel) {8 public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user, 9 int permissionLevel) { 12 10 if (req.QueryString ["steamid"] == null) { 13 resp.StatusCode = (int) HttpStatusCode.InternalServerError;11 resp.StatusCode = (int) HttpStatusCode.InternalServerError; 14 12 Web.SetResponseTextContent (resp, "No SteamID given"); 15 13 return; … … 18 16 Player p = PersistentContainer.Instance.Players [req.QueryString ["steamid"], false]; 19 17 if (p == null) { 20 resp.StatusCode = (int) HttpStatusCode.InternalServerError;18 resp.StatusCode = (int) HttpStatusCode.InternalServerError; 21 19 Web.SetResponseTextContent (resp, "Invalid or unknown SteamID given"); 22 20 return; … … 87 85 jsonItem.Add ("qualitycolor", new JSONString (QualityInfo.GetQualityColorHex (_item.quality))); 88 86 } 87 89 88 return jsonItem; 90 } else {91 return new JSONNull ();92 89 } 90 91 return new JSONNull (); 93 92 } 94 95 93 } 96 94 } 97
Note:
See TracChangeset
for help on using the changeset viewer.