diff --git a/src/main/java/app/controllers/server/ServerUpdaterController.java b/src/main/java/app/controllers/server/ServerUpdaterController.java index 1807b02..299c674 100644 --- a/src/main/java/app/controllers/server/ServerUpdaterController.java +++ b/src/main/java/app/controllers/server/ServerUpdaterController.java @@ -3,6 +3,7 @@ package app.controllers.server; import app.annotations.enums.AuthMethod; import app.annotations.interfaces.CheckWebAccess; import app.entities.Stats; +import app.entities.report.ReportBody; import app.entities.report.ReportType; import app.entities.server.request.ServerRequestBody; import app.services.ProfileService; @@ -61,11 +62,4 @@ public class ServerUpdaterController { return ResponseEntity.status(HttpStatus.OK).body( reportService.createReport(ReportType.IN_GAME, profileService.GetProfile(body.getAuthor_steam64(), "permition,steam_data"), profileService.GetProfile(body.getReported_steam64(), "permition"), body.getReason())); } - - @Data - public class ReportBody { - private String author_steam64; - private String reported_steam64 = null; - private String reason; - } } diff --git a/src/main/java/app/entities/report/ReportBody.java b/src/main/java/app/entities/report/ReportBody.java new file mode 100644 index 0000000..7a0916f --- /dev/null +++ b/src/main/java/app/entities/report/ReportBody.java @@ -0,0 +1,10 @@ +package app.entities.report; + +import lombok.Data; + +@Data +public class ReportBody { + private String author_steam64; + private String reported_steam64 = null; + private String reason; +} \ No newline at end of file diff --git a/src/main/java/app/services/ProfileService.java b/src/main/java/app/services/ProfileService.java index 11871d9..95e5300 100644 --- a/src/main/java/app/services/ProfileService.java +++ b/src/main/java/app/services/ProfileService.java @@ -74,7 +74,7 @@ public class ProfileService { } public PlayerProfile GetProfile(String steam64, List requests) { - + if (steam64 == null) return null; SteamID steamID = SteamIDConverter.getSteamID(steam64); if (null == steamID) return null; diff --git a/src/main/java/app/services/StatsService.java b/src/main/java/app/services/StatsService.java index 7e1d171..7b6e084 100644 --- a/src/main/java/app/services/StatsService.java +++ b/src/main/java/app/services/StatsService.java @@ -48,6 +48,7 @@ public class StatsService { } public RCONPlayer searchPlayer(PlayerProfile playerProfile) { + if (playerProfile == null) return null; return searchPlayer(playerProfile.getPlay_on()); }