Browse Source

мда пельмень

master
gsd 2 years ago
parent
commit
a4894bc8df
  1. 3
      src/main/java/app/controllers/admin/BanController.java
  2. 2
      src/main/java/app/controllers/admin/KickController.java
  3. 2
      src/main/java/app/controllers/admin/RconController.java
  4. 1
      src/main/java/app/controllers/user/ProfileController.java
  5. 2
      src/main/java/app/exceptions/handler/GlobalExceptionAdvice.java

3
src/main/java/app/controllers/admin/BanController.java

@ -4,6 +4,7 @@ import app.annotations.enums.AuthMethod;
import app.annotations.interfaces.BurstUpdatePlayers;
import app.annotations.interfaces.CheckPermitionFlag;
import app.annotations.interfaces.CheckWebAccess;
import app.annotations.interfaces.WaitAfterNext;
import app.entities.db.Ban;
import app.services.ProfileService;
import app.services.db.BanService;
@ -37,6 +38,7 @@ public class BanController {
@CheckWebAccess
@CheckPermitionFlag(flag = "d")
@BurstUpdatePlayers
@WaitAfterNext
public ResponseEntity banPlayer(
HttpServletRequest request,
@CookieValue(value = "steam64") String admin_steam64,
@ -55,6 +57,7 @@ public class BanController {
@DeleteMapping
@CheckWebAccess
@CheckPermitionFlag(flag = "e")
@WaitAfterNext
public ResponseEntity unbanPlayer(
HttpServletRequest request,
@CookieValue(value = "steam64") String admin_steam64,

2
src/main/java/app/controllers/admin/KickController.java

@ -3,6 +3,7 @@ package app.controllers.admin;
import app.annotations.interfaces.BurstUpdatePlayers;
import app.annotations.interfaces.CheckPermitionFlag;
import app.annotations.interfaces.CheckWebAccess;
import app.annotations.interfaces.WaitAfterNext;
import app.entities.PlayerProfile;
import app.services.ProfileService;
import app.services.ServerService;
@ -36,6 +37,7 @@ public class KickController {
@CheckWebAccess
@CheckPermitionFlag(flag = "c")
@BurstUpdatePlayers
@WaitAfterNext
public ResponseEntity kickPlayer(
HttpServletRequest request,
@CookieValue(value = "steam64") String steam64,

2
src/main/java/app/controllers/admin/RconController.java

@ -2,6 +2,7 @@ package app.controllers.admin;
import app.annotations.interfaces.CheckPermitionFlag;
import app.annotations.interfaces.CheckWebAccess;
import app.annotations.interfaces.WaitAfterNext;
import app.services.StatsService;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
@ -23,6 +24,7 @@ public class RconController {
@PostMapping
@CheckWebAccess
@CheckPermitionFlag(flag = "m")
@WaitAfterNext
public ResponseEntity<String> rcon(HttpServletRequest request,
@RequestParam String srv,
@RequestParam String command) {

1
src/main/java/app/controllers/user/ProfileController.java

@ -40,6 +40,7 @@ public class ProfileController {
@GetMapping
@CheckWebAccess
@BurstUpdatePlayers
@WaitAfterNext
public ResponseEntity GetCurrentUser(HttpServletRequest request,
@CookieValue(value = "steam64", defaultValue = "") String steam64,
@RequestParam(value = "requests", defaultValue = "") String requests

2
src/main/java/app/exceptions/handler/GlobalExceptionAdvice.java

@ -42,6 +42,6 @@ public class GlobalExceptionAdvice {
@ExceptionHandler(WaitRateLimit.class)
public ResponseEntity handWaitRateLimit(){
return new ResponseEntity<>("wait current before call this", HttpStatus.FORBIDDEN);
return new ResponseEntity<>("wait current before call this", HttpStatus.TOO_MANY_REQUESTS);
}
}

Loading…
Cancel
Save