Поправил эндпойнт начисления баллов

This commit is contained in:
Struchkov Mark 2023-02-11 16:56:54 +03:00
parent 5d4970dc3b
commit 70a12d21c6
Signed by: upagge
GPG Key ID: D3018BE7BA428CA6
1 changed files with 3 additions and 3 deletions

View File

@ -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(