Skip to content

Commit

Permalink
bug :: 버그수정
Browse files Browse the repository at this point in the history
  • Loading branch information
HyunSu1768 committed Feb 14, 2024
1 parent 9da4fbb commit 3d977c0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class Deploy(
protected set

@Column(name = "container_name", nullable = false)
var contianerNmae: String = containerName
var containerName: String = containerName
protected set

@Column(name = "github_url", nullable = false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ import org.springframework.data.jpa.repository.JpaRepository
import java.util.UUID

interface DeployRepository : JpaRepository<Deploy, UUID> {
fun existsByProjectAndServiceType(project: Project, serviceType: ServiceType): Boolean
fun existsByContainerName(containerName: String): Boolean
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ private class DeployServiceImpl(
override fun createDeploy(createDeployRequest: CreateDeployRequest): CreateDeployResponse {
val project = projectRepository.findByIdOrNull(createDeployRequest.projectId) ?: throw ProjectNotFoundException

if(deployRepository.existsByContainerName(createDeployRequest.containerName)) {
throw AlreadyExistsDeployException
}
val organization = extractOrganization(createDeployRequest.githubUrl)
val deploy = deployRepository.save(
createDeployRequest.run {
Expand All @@ -48,7 +51,7 @@ private class DeployServiceImpl(
FeignCreateDeployRequest(
email = user.email,
nameKo = deploy.project.projectNameKo,
nameEn = deploy.contianerNmae,
nameEn = deploy.containerName,
team = deploy.project.teamNameEn,
repository = getRepository(deploy.githubUrl),
organization = deploy.organization,
Expand Down

0 comments on commit 3d977c0

Please sign in to comment.