Changeset 437 for binary-improvements2/WebServer/src
- Timestamp:
- May 18, 2023, 4:31:05 PM (18 months ago)
- Location:
- binary-improvements2/WebServer/src/WebAPI/APIs
- Files:
-
- 3 added
- 1 edited
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements2/WebServer/src/WebAPI/APIs/GameData/Item.cs
r434 r437 57 57 } 58 58 59 public override int DefaultPermissionLevel () { 60 return AdminWebModules.PermissionLevelGuest; 61 } 59 public override int DefaultPermissionLevel () => AdminWebModules.PermissionLevelGuest; 62 60 } 63 61 } -
binary-improvements2/WebServer/src/WebAPI/APIs/ServerState/ServerInfo.cs
r436 r437 2 2 using JetBrains.Annotations; 3 3 using Utf8Json; 4 using Webserver.Permissions; 4 5 5 namespace Webserver.WebAPI.APIs {6 namespace Webserver.WebAPI.APIs.ServerState { 6 7 [UsedImplicitly] 7 8 public class ServerInfo : AbsRestApi { … … 23 24 GameServerInfo gsi = ConnectionManager.Instance.LocalServerInfo; 24 25 26 bool first = true; 27 25 28 IList<GameInfoString> list = EnumUtils.Values<GameInfoString> (); 26 29 for (int i = 0; i < list.Count; i++) { 27 30 GameInfoString stringGamePref = list [i]; 28 31 29 if ( i > 0) {32 if (!first) { 30 33 writer.WriteValueSeparator (); 31 34 } 32 35 33 writer.WriteString (stringGamePref.ToStringCached ()); 34 writer.WriteNameSeparator (); 36 first = false; 37 38 writer.WritePropertyName (stringGamePref.ToStringCached ()); 35 39 36 40 writer.WriteRaw (keyType); … … 47 51 GameInfoInt intGamePref = ints [i]; 48 52 49 if ( i > 0) {53 if (!first) { 50 54 writer.WriteValueSeparator (); 51 55 } 52 56 53 writer.WriteString (intGamePref.ToStringCached ()); 54 writer.WriteNameSeparator (); 57 first = false; 58 59 writer.WritePropertyName (intGamePref.ToStringCached ()); 55 60 56 61 writer.WriteRaw (keyType); … … 67 72 GameInfoBool boolGamePref = prefs [i]; 68 73 69 if ( i > 0) {74 if (!first) { 70 75 writer.WriteValueSeparator (); 71 76 } 72 77 73 writer.WriteString (boolGamePref.ToStringCached ()); 74 writer.WriteNameSeparator (); 78 first = false; 79 80 writer.WritePropertyName (boolGamePref.ToStringCached ()); 75 81 76 82 writer.WriteRaw (keyType); … … 94 100 SendEnvelopedResult (_context, ref writer); 95 101 } 102 103 public override int DefaultPermissionLevel () => AdminWebModules.PermissionLevelGuest; 96 104 } 97 105 } -
binary-improvements2/WebServer/src/WebAPI/APIs/ServerState/ServerStats.cs
r436 r437 4 4 using Webserver.Permissions; 5 5 6 namespace Webserver.WebAPI.APIs {6 namespace Webserver.WebAPI.APIs.ServerState { 7 7 [UsedImplicitly] 8 8 public class ServerStats : AbsRestApi { -
binary-improvements2/WebServer/src/WebAPI/APIs/WorldState/Bloodmoon.cs
r436 r437 2 2 using Utf8Json; 3 3 4 namespace Webserver.WebAPI.APIs {4 namespace Webserver.WebAPI.APIs.WorldState { 5 5 [UsedImplicitly] 6 6 public class Bloodmoon : AbsRestApi {
Note:
See TracChangeset
for help on using the changeset viewer.