From 70a12d21c699619833c321cf35d8361996c7a9ca Mon Sep 17 00:00:00 2001 From: Struchkov Mark Date: Sat, 11 Feb 2023 16:56:54 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D1=8D=D0=BD=D0=B4=D0=BF=D0=BE=D0=B9=D0=BD=D1=82=20?= =?UTF-8?q?=D0=BD=D0=B0=D1=87=D0=B8=D1=81=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F=20?= =?UTF-8?q?=D0=B1=D0=B0=D0=BB=D0=BB=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sadtech/example/swagger/controller/PointController.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/sadtech/example/swagger/controller/PointController.java b/src/main/java/org/sadtech/example/swagger/controller/PointController.java index 2a30076..f710c60 100644 --- a/src/main/java/org/sadtech/example/swagger/controller/PointController.java +++ b/src/main/java/org/sadtech/example/swagger/controller/PointController.java @@ -12,7 +12,7 @@ import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import java.util.Map; @@ -36,8 +36,8 @@ public class PointController { @Operation(summary = "Управление баллами", description = "Позволяет удалить или добавить баллы пользователю") public HttpStatus changePoints( @PathVariable @NotBlank @Parameter(description = "Идентификатор пользователя") String key, - @RequestPart("point") @Min(0) @Parameter(description = "Количество баллов", required = true) Long point, - @RequestPart("type") @Parameter(description = "Тип операции", required = true) TypeOperation type + @RequestParam("point") @Min(0) @Parameter(description = "Количество баллов", required = true) Long point, + @RequestParam("type") @Parameter(description = "Тип операции", required = true) TypeOperation type ) { final UserDto userDto = repository.get(key); userDto.setPoints(