Skip to content

Commit

Permalink
Merge pull request #110 from Billing-Wise/fix/회원-중복-허용
Browse files Browse the repository at this point in the history
[fix] 회원 중복 허용
  • Loading branch information
dtd1614 authored Aug 5, 2024
2 parents bf4b4b7 + f771f42 commit b031ea7
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 7 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,15 @@ jobs:
- name: Grant execute permission to Gradle Wrapper
run: chmod +x ./gradlew

- name: Cache Jib layers
uses: actions/cache@v3
with:
path: ./server-api/build/jib-cache
key: ${{ runner.os }}-jib-${{ github.job }}-${{ hashFiles('**/build.gradle') }}
restore-keys: ${{ runner.os }}-jib-${{ github.job }}

- name: Build and push image to Amazon ECR
run: ./gradlew clean jib -x test
run: ./gradlew jib -x test

- name: Deploy to AWS ECS
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
}

group = 'site.billingwise.api'
version = '1.0.5'
version = '1.0.6'

java {
toolchain {
Expand Down Expand Up @@ -119,7 +119,7 @@ tasks.named('asciidoctor') {

jib {
from {
image = "eclipse-temurin:17-jdk"
image = "eclipse-temurin:17-jdk-alpine"
}
to {
image = "891376922202.dkr.ecr.ap-northeast-2.amazonaws.com/t5-api-ecr"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ public GetConsentDto editConsentSignImage(Long memberId, MultipartFile multipart
return GetConsentDto.toDto(consentAccount);
}

@Transactional
public void deleteConsent(Long memberId) {
checkMemberPermission(memberId);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ public void consentForNonMember(
Item item = itemRepository.findByIdAndClientIdAndIsBasic(dto.getItemId(), clientId, true)
.orElseThrow(() -> new GlobalException(FailureInfo.ITEM_NOT_FOUND));

if (memberRepository.existsByClientIdAndEmail(clientId, dto.getMemberEmail())) {
throw new GlobalException(FailureInfo.ALREADY_EXIST_MEMBER);
}

Member member = Member.builder()
.client(client)
.email(dto.getMemberEmail())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
import jakarta.servlet.http.Cookie;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import lombok.experimental.UtilityClass;

import java.util.Optional;

@UtilityClass
public class CookieUtil {

public static Cookie getCookie(HttpServletRequest request, String name) {
Cookie[] cookies = request.getCookies();
if (cookies != null) {
Expand All @@ -16,6 +19,7 @@ public static Cookie getCookie(HttpServletRequest request, String name) {
}
}
}
System.out.println("hi");
return null;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package site.billingwise.api.serverapi.global.util;

import lombok.experimental.UtilityClass;
import site.billingwise.api.serverapi.domain.common.EnumField;
import site.billingwise.api.serverapi.global.exception.GlobalException;
import site.billingwise.api.serverapi.global.response.info.FailureInfo;

import java.util.EnumSet;
import java.util.NoSuchElementException;

@UtilityClass
public class EnumUtil {

public static <T extends Enum<T> & EnumField> Long toId(T enumClass) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package site.billingwise.api.serverapi.global.util;

import lombok.experimental.UtilityClass;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.usermodel.Row;

import site.billingwise.api.serverapi.global.exception.GlobalException;
import site.billingwise.api.serverapi.global.response.info.FailureInfo;

@UtilityClass
public class PoiUtil {

public static String getCellValue(Cell cell) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package site.billingwise.api.serverapi.global.util;

import lombok.experimental.UtilityClass;
import org.springframework.security.core.context.SecurityContextHolder;
import site.billingwise.api.serverapi.domain.user.CustomUserDetails;
import site.billingwise.api.serverapi.domain.user.Client;
Expand All @@ -9,6 +10,7 @@

import java.util.Optional;

@UtilityClass
public class SecurityUtil {

public static Optional<User> getCurrentUser() {
Expand Down

0 comments on commit b031ea7

Please sign in to comment.