Skip to content

Commit

Permalink
[BOOK-28]-reviewResponse에 book null 체크 추가 (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunny2you authored Oct 12, 2024
1 parent 1e60100 commit 8baf13d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ jobs:
password: ${{ secrets.TEAM_SERVER_PASSWORD }}
port: ${{ secrets.TEAM_SERVER_PORT }}
script: |
sudo docker-compose -f ../docker-compose.yml pull
sudo docker-compose -f ../docker-compose.yml up -d
echo "${{ secrets.TEAM_SERVER_PASSWORD }}" | sudo -S docker-compose -f /home/haneum/docker-compose.yml pull
echo "${{ secrets.TEAM_SERVER_PASSWORD }}" | sudo -S docker-compose -f /home/haneum/docker-compose.yml up -d
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ CorsConfigurationSource corsConfigurationSource() {
CorsConfiguration config = new CorsConfiguration();
config.setAllowedHeaders(Collections.singletonList("*"));
config.setAllowedMethods(Collections.singletonList("*"));
config.setAllowedOriginPatterns(Arrays.asList("http://localhost:5173"));
config.setAllowedOriginPatterns(Arrays.asList("http://localhost:5173","https://team1-booklog.vercel.app/"));
config.setAllowCredentials(true);
return config;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public static ReviewResponse of(Review review) {
.userId(review.getUser().getId())
.content(review.getContent())
.file(review.getFile() != null ? FileResponse.from(review.getFile()) : null)
.book(BookResponse.from(review.getBook()))
.book(review.getBook() != null ? BookResponse.from(review.getBook()) : null)
.createdAt(review.getCreatedAt().format(formatter))
.updatedAt(review.getUpdatedAt().format(formatter))
.build();
Expand Down
5 changes: 2 additions & 3 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ spring:

data:
redis:
host: ${REDIS_HOST:localhost}
port: ${REDIS_PORT:6379}
password: ${REDIS_PASSWORD}
host: redis
port: 6379

springdoc:
default-consumes-media-type: application/json
Expand Down

0 comments on commit 8baf13d

Please sign in to comment.