Skip to content

Commit

Permalink
refactor :: projectNameEn 중복확인
Browse files Browse the repository at this point in the history
  • Loading branch information
4mjeo committed Feb 27, 2024
1 parent 44069f4 commit eb6543d
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ class ProjectServiceImpl (
override fun register(req: RegisterProjectRequest, logo: MultipartFile, projectImage: List<MultipartFile>?): ProjectDetailResponse {
val user = userFacade.getCurrentUser()

val duplicateProject = projectRepository.findByProjectNameEn(req.projectNameEn)

if (duplicateProject != null) {
throw AlreadyExistException
}

val logoUrl = logo.let { fileService.upload(it, req.projectNameEn).url } ?: ""
val projectImageUrls = projectImage?.let {
if (it.isNotEmpty()) {
Expand Down

0 comments on commit eb6543d

Please sign in to comment.