Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Weekly/11] feat: 이미지 업로드 최대사이즈 제한 설정 #96

Prev Previous commit
Next Next commit
Update AdvertisementController.java
Daolove0323 committed Nov 8, 2024
commit f531c791fefe12f031d89e17f67d05adb57a286b
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ public ResponseEntity<ApiResponseBody<AdvertisementResponse>> getAdvertisementBy
public ResponseEntity<ApiResponseBody<AdvertisementResponse>> createAdvertisement(
@Valid @RequestPart AdvertisementRequest advertisementRequest,
@RequestPart(required = false) MultipartFile image,
@Authorize(MemberType.admin) MemberIdentifier memberIdentifier) {
@Authorize(MemberType.admin) MemberIdentifier admin) {
return ApiResponse.created(advertisementService.create(advertisementRequest, image));
}

@@ -54,14 +54,14 @@ public ResponseEntity<ApiResponseBody<AdvertisementResponse>> updateAdvertisemen
@PathVariable Long adId,
@Valid @RequestPart AdvertisementRequest advertisementRequest,
@RequestPart(required = false) MultipartFile image,
@Authorize(MemberType.admin) MemberIdentifier memberIdentifier) {
@Authorize(MemberType.admin) MemberIdentifier admin) {
return ApiResponse.ok(advertisementService.update(adId, advertisementRequest, image));
}

@DeleteMapping("/{adId}")
public ResponseEntity<ApiResponseBody<Void>> deleteAdvertisement(
@PathVariable Long adId,
@Authorize(MemberType.admin) MemberIdentifier memberIdentifier) {
@Authorize(MemberType.admin) MemberIdentifier admin) {
advertisementService.delete(adId);
return ApiResponse.noContent();
}