Skip to content

Commit 67d19e2

Browse files
committed
RequestParam to RequestBodyParam for companyDescription
1 parent 4f287d6 commit 67d19e2

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/main/java/com/serve/api/controler/CompanyController.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import org.springframework.web.bind.annotation.PutMapping;
1414
import org.springframework.web.bind.annotation.RequestBody;
1515
import org.springframework.web.bind.annotation.RequestMapping;
16-
import org.springframework.web.bind.annotation.RequestParam;
1716
import org.springframework.web.bind.annotation.ResponseStatus;
1817
import org.springframework.web.bind.annotation.RestController;
1918

@@ -22,8 +21,6 @@
2221
import static com.serve.api.controler.endpoints.Endpoints.COMPANY;
2322
import static com.serve.api.controler.endpoints.Endpoints.ID;
2423

25-
// TODO: 13.08.22 змінити оновленння дескріпшін через боді
26-
2724
@RestController
2825
@AllArgsConstructor
2926
@RequestMapping(COMPANY)
@@ -50,7 +47,7 @@ public void create(@RequestBody CompanyDto company) {
5047

5148
@PutMapping(ID)
5249
@ResponseStatus(code = HttpStatus.ACCEPTED)
53-
public void update(@PathVariable Long id, @RequestParam String description) {
50+
public void update(@PathVariable Long id, @RequestBody String description) {
5451
service.update(id, description);
5552
}
5653

0 commit comments

Comments
 (0)