-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #230 from TeamDilly/develop
* fix: CorsConfig 추가 * fix: CORS origin 변경 (#224) * fix: 박스 만들기, 박스 열기 API 응답값에 로띠 추가 (#226) * fix: 웹용 선물박스 열기 API 7일 제한 제거 (#227) * fix: 웹용 선물박스 열기 API id와 uuid 둘 다 사용 가능하도록 변경 (#228) * refactor: UUID인지 검증하는 코드 validator로 분리 * fix: 웹용 선물박스 열기 API id와 uuid 둘 다 사용 가능하도록 변경 * chore: docker-compose version 제거 * style: 유틸 클래스에 private 생성자 추가 * fix: CORS origin 추가 (#229) * fix: CORS origin 추가 * style: 누락된 세미콜론 추가 * fix: allowedOrigins 코드 수정 (#231)
- Loading branch information
Showing
13 changed files
with
84 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
version: '3' | ||
services: | ||
mysql-docker: | ||
image: mysql:latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
packy-api/src/main/java/com/dilly/global/config/CorsConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.dilly.global.config; | ||
|
||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.web.servlet.config.annotation.CorsRegistry; | ||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; | ||
|
||
@Configuration | ||
public class CorsConfig implements WebMvcConfigurer { | ||
|
||
@Override | ||
public void addCorsMappings(CorsRegistry registry) { | ||
registry.addMapping("/**") | ||
.allowedMethods("GET") | ||
.allowedOrigins("https://packyforyou.com", "https://dev.packyforyou.com"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
packy-api/src/main/java/com/dilly/global/util/validator/UuidValidator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.dilly.global.util.validator; | ||
|
||
import java.util.regex.Pattern; | ||
import lombok.AccessLevel; | ||
import lombok.NoArgsConstructor; | ||
|
||
@NoArgsConstructor(access = AccessLevel.PRIVATE) | ||
public class UuidValidator { | ||
|
||
public static boolean isValidUUID(String value) { | ||
final Pattern uuidPattern = | ||
Pattern.compile( | ||
"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"); | ||
return value != null && uuidPattern.matcher(value).matches(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
packy-domain/src/main/resources/db/migration/V35__add_lottie_column_in_box_table.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-- 컬럼 추가 | ||
ALTER TABLE box ADD COLUMN lottie_make_url VARCHAR(255) NOT NULL; | ||
ALTER TABLE box ADD COLUMN lottie_arrived_url VARCHAR(255) NOT NULL; | ||
|
||
-- 데이터 삽입 | ||
UPDATE box SET lottie_make_url = CONCAT('https://packy-bucket.s3.ap-northeast-2.amazonaws.com/admin/design/Box_motion/make/Box_motion_make_', id, '.json'); | ||
UPDATE box SET lottie_arrived_url = CONCAT('https://packy-bucket.s3.ap-northeast-2.amazonaws.com/admin/design/Box_motion/arr/Box_motion_arr_', id, '.json'); |
Submodule packy-submodule
updated
from c93861 to 54b003