Browse Source

не ну я не знаю что ему не хватает надо исключить всё

master
gsd 2 years ago
parent
commit
22843604aa
  1. 15
      src/main/java/app/controllers/user/DetailController.java

15
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<SteamID> GetSteamOnHashMap(HttpServletRequest request,
@RequestBody HashMap<String, String> container) {
if (!container.containsKey("any")) return new ResponseEntity(HttpStatus.BAD_REQUEST);
return new ResponseEntity<>(profileService.GetSteamIDFromAnyData(container.get("any")), HttpStatus.OK);
}
}

Loading…
Cancel
Save