Skip to content

Commit

Permalink
Update request mapping for controller
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthiasK-creator committed Aug 29, 2023
1 parent eadc50a commit 440c8a0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@
import com.specialist.code.application.productcreation.model.response.CommonProductResponseModel;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController("/commonProducts")
@RestController()
@RequestMapping("/commonProducts")
public class CommonProductRegisterController {
ICommonProductRegisterBoundary inputBoundary;

public CommonProductRegisterController(ICommonProductRegisterBoundary inputBoundary) {
this.inputBoundary = inputBoundary;
}

@PostMapping("/create")
@PostMapping
public CommonProductResponseModel create(@RequestBody CommonProductRequestModel requestModel) throws ProductCustomException {
return this.inputBoundary.create(requestModel);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@
import com.specialist.code.application.productcreation.model.response.TechnicalProductResponseModel;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController("/technicalProduct")
@RestController
@RequestMapping("/technicalProduct")
public class TechnicalProductRegisterController {
ITechnicalProductRegisterBoundary inputBoundary;

public TechnicalProductRegisterController(ITechnicalProductRegisterBoundary inputBoundary) {
this.inputBoundary = inputBoundary;
}

@PostMapping("/create")
@PostMapping
public TechnicalProductResponseModel create(@RequestBody TechnicalProductRequestModel requestModel) throws ProductCustomException {
return inputBoundary.create(requestModel);
}
Expand Down

0 comments on commit 440c8a0

Please sign in to comment.