Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev-server' into dev-server
Browse files Browse the repository at this point in the history
  • Loading branch information
Taekgil99 committed Dec 1, 2022
2 parents 85e46b6 + 042e963 commit 0afc908
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.backend.domain.product.domain.Product;
import com.backend.domain.product.dto.DetailImg;
import com.backend.domain.product.dto.ProResponseDto;
import com.backend.domain.product.dto.ProductResponseDto;
import com.backend.domain.product.dto.TitleImg;
import com.backend.domain.product.mapper.ProductMapper;
import com.backend.global.annotation.CurrentUser;
Expand Down Expand Up @@ -48,8 +49,10 @@ public ResponseEntity update(@PathVariable Long productsId,@CurrentUser CustomUs
log.info(" ์ˆ˜์ • ์‹คํ–‰ ");

Product response = productService.update(productsId,categoryId,price,productName,titleImg,detailImg);
ProductResponseDto productResponseDto = productMapper.productToProductResponseDto(response);
productResponseDto.setCategoryId(response.getCategory().getCategoryId());
log.info(" ์ˆ˜์ • ๋œ ์ƒํ’ˆ ์ถœ๋ ฅ ");
return new ResponseEntity(new SingleResponseDto<>(productMapper.productToProductResponseDto(response)), HttpStatus.OK);
return new ResponseEntity(new SingleResponseDto<>(productResponseDto), HttpStatus.OK);
}

@DeleteMapping("/products/{productsId}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@ public class ProductResponseDto {

private String tag;

private Long categoryId;


}

0 comments on commit 0afc908

Please sign in to comment.