Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,22 @@

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;


import com.brainpix.api.ApiResponse;
import com.brainpix.profile.dto.CompanyProfileResponseDto;
import com.brainpix.profile.dto.CompanyProfileUpdateDto;
import com.brainpix.profile.dto.IndividualProfileResponseDto;
import com.brainpix.profile.dto.IndividualProfileUpdateDto;
import com.brainpix.profile.service.ProfileService;

import com.brainpix.security.authorization.AllUser;
import com.brainpix.security.authorization.Company;
import com.brainpix.security.authorization.Individual;
import com.brainpix.security.authorization.UserId;

import io.swagger.v3.oas.annotations.Operation;

import lombok.RequiredArgsConstructor;

@RestController
Expand All @@ -43,7 +35,6 @@ public ResponseEntity<ApiResponse<IndividualProfileResponseDto>> getIndividualPr
return ResponseEntity.ok(ApiResponse.success(profile));
}


@Operation(summary = "기업 사용자 프로필 조회", description = "현재 로그인한 기업 사용자의 프로필을 조회합니다.")
@Company
@GetMapping("/company")
Expand Down Expand Up @@ -72,7 +63,7 @@ public ResponseEntity<ApiResponse<Void>> updateCompanyProfile(
return ResponseEntity.ok(ApiResponse.success(null));
}

@Operation(summary = "프로필 이미지 업로드", description = "현재 로그인한 사용자의 프로필 이미지를 업로드합니다.")
/*@Operation(summary = "프로필 이미지 업로드", description = "현재 로그인한 사용자의 프로필 이미지를 업로드합니다.")
@AllUser
@PostMapping("/{userId}/upload-profile-image")
public ResponseEntity<ApiResponse<String>> uploadProfileImage(
Expand All @@ -82,5 +73,5 @@ public ResponseEntity<ApiResponse<String>> uploadProfileImage(
String imagePath = "/path/to/uploaded/image.jpg"; // 예시
String savedPath = profileService.uploadProfileImage(userId, imagePath);
return ResponseEntity.ok(ApiResponse.success(savedPath));
}
}*/
}
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ public CompanyProfileResponseDto getCompanyProfile(Long userId) {
return myconverter.toCompanyDto((Company)user);
}

public String uploadProfileImage(Long userId, String imagePath) {
/*public String uploadProfileImage(Long userId, String imagePath) {
User user = userRepository.findById(userId)
.orElseThrow(() -> new BrainPixException(ProfileErrorCode.USER_NOT_FOUND));
user.updateProfileImage(imagePath);
return imagePath;
}
}*/
}