엔드포인트 합치기

keep_going·2023년 5월 12일
0

문제해결

목록 보기
29/36
// 판매입찰(빠른배송, 즉시구매) 거래 체결
	@PostMapping("/api/post/contract/sell")
	public ResponseEntity<?> addContractSell (@RequestBody ContractAddDTO contractDto, @RequestParam String type) {
		try {
			Contract contractInfo = contractService.save(contractDto, type);
			sellingService.updateSelling(contractDto.getSellingId(), type);
			return new ResponseEntity<Contract>(contractInfo, HttpStatus.OK);		
		} catch (Exception e) {
			return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
		}
	}

원래는 updateSelling 을 따로 콘트롤러에 구현해야 하는줄 알았음
굿~

profile
keep going

0개의 댓글