Browse Source

report hype v6

master
gsd 10 months ago
parent
commit
b35436acf4
  1. 8
      src/main/java/app/controllers/server/ServerUpdaterController.java
  2. 10
      src/main/java/app/entities/report/ReportBody.java
  3. 2
      src/main/java/app/services/ProfileService.java
  4. 1
      src/main/java/app/services/StatsService.java

8
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;
}
}

10
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;
}

2
src/main/java/app/services/ProfileService.java

@ -74,7 +74,7 @@ public class ProfileService {
}
public PlayerProfile GetProfile(String steam64, List<String> requests) {
if (steam64 == null) return null;
SteamID steamID = SteamIDConverter.getSteamID(steam64);
if (null == steamID) return null;

1
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());
}

Loading…
Cancel
Save