Browse Source

profile methods now request secretkey

master
gsd 2 years ago
parent
commit
d799293a0e
  1. 7
      src/main/java/app/controllers/user/DetailController.java

7
src/main/java/app/controllers/user/DetailController.java

@ -1,5 +1,6 @@
package app.controllers.user; package app.controllers.user;
import app.annotations.enums.AuthMethod;
import app.annotations.interfaces.CheckPermitionFlag; import app.annotations.interfaces.CheckPermitionFlag;
import app.annotations.interfaces.CheckWebAccess; import app.annotations.interfaces.CheckWebAccess;
import app.entities.other.SteamID; import app.entities.other.SteamID;
@ -24,16 +25,14 @@ public class DetailController {
} }
@GetMapping @GetMapping
@CheckWebAccess @CheckWebAccess(auth_method = AuthMethod.SECRET_KEY)
@CheckPermitionFlag(flag = "z")
public ResponseEntity GetUser(HttpServletRequest request, public ResponseEntity GetUser(HttpServletRequest request,
@RequestParam String steam64) { @RequestParam String steam64) {
return new ResponseEntity(profileService.GetProfile(steam64), HttpStatus.OK); return new ResponseEntity(profileService.GetProfile(steam64), HttpStatus.OK);
} }
@GetMapping("/steam") @GetMapping("/steam")
@CheckWebAccess @CheckWebAccess(auth_method = AuthMethod.SECRET_KEY)
@CheckPermitionFlag(flag = "z")
public ResponseEntity<SteamID> GetSteam(HttpServletRequest request, public ResponseEntity<SteamID> GetSteam(HttpServletRequest request,
@RequestParam String any) { @RequestParam String any) {
return new ResponseEntity<>(profileService.GetSteamIDFromAnyData(any), HttpStatus.OK); return new ResponseEntity<>(profileService.GetSteamIDFromAnyData(any), HttpStatus.OK);

Loading…
Cancel
Save