diff --git a/src/main/java/app/controllers/user/DetailController.java b/src/main/java/app/controllers/user/DetailController.java index 003c3e6..92d66fd 100644 --- a/src/main/java/app/controllers/user/DetailController.java +++ b/src/main/java/app/controllers/user/DetailController.java @@ -8,10 +8,9 @@ import jakarta.servlet.http.HttpServletRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; + +import java.util.HashMap; @RestController @RequestMapping("api/profile") @@ -36,4 +35,12 @@ public class DetailController { @RequestParam String any) { return new ResponseEntity<>(profileService.GetSteamIDFromAnyData(any), HttpStatus.OK); } + + @PostMapping("/steam") + @CheckWebAccess(auth_method = AuthMethod.SECRET_KEY) + public ResponseEntity GetSteamOnHashMap(HttpServletRequest request, + @RequestBody HashMap container) { + if (!container.containsKey("any")) return new ResponseEntity(HttpStatus.BAD_REQUEST); + return new ResponseEntity<>(profileService.GetSteamIDFromAnyData(container.get("any")), HttpStatus.OK); + } }