Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BE] hotfix 로 인한 운영서버 변경 사항 개발서버에 적용 #626

Merged
merged 42 commits into from
Nov 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
17c9ae1
refactor: 비로그인 시 pin detail에서 image 추가 버튼 숨기기
GC-Park Oct 2, 2023
7fe254c
Merge pull request #542 from woowacourse-teams/refactor/#541-pin-imag…
GC-Park Oct 2, 2023
4c55e87
[FE] Feat/#554 search 지도 검색 기능 구현 (#555)
jiwonh423 Oct 6, 2023
5a96390
[FE] refactor/#450 모아보기 기능 비회원도 가능하도록 수정 (#516)
GC-Park Oct 6, 2023
8ef188d
chore: eslint 설정 적용 (#557)
jiwonh423 Oct 6, 2023
df6ba08
[FE] Refactor/eslint ESLint 추가 적용 (#559)
semnil5202 Oct 6, 2023
4cf019b
Merge pull request #558 from woowacourse-teams/develop-BE
yoondgu Oct 6, 2023
d21a556
feat/#564 poi 적용 (#566)
jiwonh423 Oct 12, 2023
73896dd
hotfix: dotenv 추가 (#574)
jiwonh423 Oct 12, 2023
f31be53
hotfix: env 이름 형식 통일 (#575)
GC-Park Oct 12, 2023
1fca8df
hotfix: DotenvWebpackPlugin추가 (#576)
jiwonh423 Oct 12, 2023
88d3978
fix: require 수정 (#577)
jiwonh423 Oct 12, 2023
d3bd94e
[FE] Feature/#560 메인 페이지에 swiper 및 배너 적용 (#569)
semnil5202 Oct 13, 2023
02872e2
[FE] Refactor/#572 핀 이미지 태그로 교체 및 아이콘 소스 검토 (#573)
semnil5202 Oct 13, 2023
df8f0cc
Hotfix/swiper UI (#579)
semnil5202 Oct 13, 2023
ff18a09
[FE] Feature/#550 토픽 이미지 수정 및 핀 이미지 삭제 기능 (#583)
GC-Park Oct 13, 2023
45d395d
[FE] Feat/#588 현재 위치 이동 버튼 (#589)
jiwonh423 Oct 16, 2023
a9be810
[FE] Refactor/#578 지도 핀 Boundary 조정 (#590)
semnil5202 Oct 17, 2023
a28aaec
Hotfix/current position (#594)
semnil5202 Oct 17, 2023
9ee045a
refactor: 사용자 위치 조회 로직 수정 (#596)
semnil5202 Oct 17, 2023
f9c8a8b
refactor: 현재 위치 요청 로직 변경 (#599)
semnil5202 Oct 17, 2023
4f477d0
refactor: watchPosition 에서 getCurrentPosition으로 변경 (#600)
semnil5202 Oct 17, 2023
d7fc2e0
[FE] Feat/#592 핀 디테일의 핀 이미지 클릭 시 모달을 통해 크게 보이는 기능 구현 (#595)
GC-Park Oct 19, 2023
407230d
Merge pull request #605 from woowacourse-teams/develop-BE
junpakPark Oct 19, 2023
d0eab4d
[FE] Feat/#597 댓글 기능 구현 (#598)
jiwonh423 Oct 19, 2023
0baf20e
fix: 운영 서버 workflow Dockerfile 이름 수정
yoondgu Oct 19, 2023
aee8367
fix: 운영서버 ci/cd 를 위한 Dockerfile-prod 에 개행 추가
kpeel5839 Oct 19, 2023
24d1215
Merge pull request #606 from woowacourse-teams/hotfix/workflow
kpeel5839 Oct 19, 2023
4574c3a
[FE] Feat/#604 image swiper 적용 및 image size limit 적용 (#608)
GC-Park Oct 19, 2023
4dce3c3
[FE] Refactor/#593 모아보기와 단일조회페이지 분리 및 리팩토링 (#607)
semnil5202 Oct 19, 2023
f7279ce
Merge branch 'main' into develop-FE
semnil5202 Oct 19, 2023
fa683fd
Merge pull request #609 from woowacourse-teams/develop-FE
semnil5202 Oct 19, 2023
11eafa3
fix: 핀 디테일 때 맵 클릭 시 움직이지 않던 에러 해결
GC-Park Oct 19, 2023
f9592be
fix: 누락된 TMAP_API_KEY 반영
jiwonh423 Oct 19, 2023
d6dc459
fix: 모아보기 클릭이벤트 수정
jiwonh423 Oct 19, 2023
012653b
refactor: pinDetail 페이지 줌인
jiwonh423 Oct 19, 2023
50a5eac
fix: banner url 수정
jiwonh423 Oct 19, 2023
a8f64a4
Merge pull request #610 from woowacourse-teams/hotfix/pinDetail-not-move
jiwonh423 Oct 19, 2023
da2c754
[FE] Hotfix/map panto 오류 수정 (#611)
semnil5202 Oct 20, 2023
840c19e
test: 버그 해결을 위한 테스트 추가
yoondgu Nov 13, 2023
ad19450
fix: 핀 삭제 시 토픽의 핀 개수 반영 안되는 문제 해결
yoondgu Nov 13, 2023
8f2395a
Merge pull request #621 from woowacourse-teams/hotfix/#619
yoondgu Nov 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/be-merge-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:

- name: Docker Image Build
working-directory: backend
run: docker build --platform linux/arm64/v8 -t mapbefine/mapbefine -f Dockerfile-dev .
run: docker build --platform linux/arm64/v8 -t mapbefine/mapbefine -f Dockerfile-prod .

- name: Docker Hub Push
run: docker push mapbefine/mapbefine
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/fe-merge-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:

pull_request:
branches: [develop-FE-2]
branches: [develop-FE]
types: [closed]
paths: frontend/**

Expand Down Expand Up @@ -35,6 +35,7 @@ jobs:
working-directory: frontend
env:
REACT_APP_GOOGLE_ANALYTICS: ${{ secrets.REACT_APP_GOOGLE_ANALYTICS }}
REACT_APP_TMAP_API_KEY: ${{ secrets.REACT_APP_TMAP_API_KEY }}
APP_URL: "https://mapbefine.kro.kr/api"

- name: upload to artifact
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/fe-merge-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
working-directory: frontend
env:
REACT_APP_GOOGLE_ANALYTICS: ${{ secrets.REACT_APP_GOOGLE_ANALYTICS }}
REACT_APP_TMAP_API_KEY: ${{ secrets.REACT_APP_TMAP_API_KEY }}
APP_URL: "https://mapbefine.com/api"

- name: upload to artifact
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fe-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Frontend CI For Test Validation
on:
# pull request open과 reopen 시 실행한다.
pull_request:
branches: [main, develop-FE-2]
branches: [main, develop-FE]
paths: frontend/**

defaults:
Expand Down
4 changes: 2 additions & 2 deletions backend/Dockerfile-prod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM openjdk:17
COPY build/libs/mapbefine.jar mapbefine.jar
FROM openjdk:17
COPY build/libs/mapbefine.jar mapbefine.jar
ENTRYPOINT ["java", "-jar","-Dspring.profiles.active=prod", "mapbefine.jar"]
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ public void deletePin(Long pinId) {
.orElseThrow(() -> new PinNotFoundException(PIN_NOT_FOUND, pinId));

pin.decreaseTopicPinCount();
pinRepository.flush();
pinImageRepository.deleteAllByPinId(pinId);
pinRepository.deleteById(pin.getId());
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.mapbefine.mapbefine.admin;

import static io.restassured.RestAssured.given;
import static io.restassured.RestAssured.*;
import static org.assertj.core.api.Assertions.assertThat;
import static org.springframework.http.HttpHeaders.AUTHORIZATION;

Expand All @@ -23,7 +23,8 @@
import com.mapbefine.mapbefine.topic.TopicFixture;
import com.mapbefine.mapbefine.topic.domain.Topic;
import com.mapbefine.mapbefine.topic.domain.TopicRepository;
import io.restassured.common.mapper.TypeRef;
import io.restassured.common.mapper.*;
import java.util.List;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
Expand All @@ -32,8 +33,6 @@
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;

import java.util.List;

class AdminIntegrationTest extends IntegrationTest {

@Autowired
Expand Down Expand Up @@ -124,15 +123,13 @@ void findMemberDetail_Success() {
.extract()
.as(new TypeRef<>() {
});
System.out.println("====" + topic.getPinCount());
//then

//then
AdminMemberDetailResponse expected = AdminMemberDetailResponse.of(
member,
member.getCreatedTopics(),
member.getCreatedPins()
);

assertThat(response).usingRecursiveComparison()
.ignoringFields("updatedAt")
.ignoringFields("topics.updatedAt")
Expand Down Expand Up @@ -218,6 +215,9 @@ void deletePin_Success() {
.when().delete("/admin/pins/" + pin.getId())
.then().log().all()
.statusCode(HttpStatus.NO_CONTENT.value());

Topic updatedTopic = topicRepository.findById(topic.getId()).get();
assertThat(updatedTopic.getPinCount()).isEqualTo(0);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,20 @@ void deletePin_Success() {
assertThat(pinRepository.existsById(pin.getId())).isFalse();
}

@DisplayName("핀 삭제 시, 토픽의 핀 개수를 1 감소시킨다.")
@Test
void deletePin_Success_decreaseTopicPinCount() {
//given
assertThat(pin.isDeleted()).isFalse();
int pinCountBeforeDelete = topic.getPinCount();

//when
adminCommandService.deletePin(pin.getId());

//then
assertThat(topic.getPinCount()).isEqualTo(pinCountBeforeDelete - 1);
}

@DisplayName("Admin인 경우, 핀 이미지를 삭제할 수 있다.")
@Test
void deletePinImage_Success() {
Expand Down
21 changes: 21 additions & 0 deletions frontend/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,27 @@ module.exports = {
],
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'no-undef': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'import/prefer-default-export': 'off',
'no-use-before-define': 'off',
'react/require-default-props': 'off',
'react/destructuring-assignment': 'off',
'react/jsx-no-constructed-context-values': 'off',
'no-restricted-globals': 'off',
'no-shadow': 'off',
'consistent-return': 'off',
'no-restricted-syntax': 'off',
'no-await-in-loop': 'off',
'no-param-reassign': 'off',
'jsx-a11y/tabindex-no-positive': 'off',
'react/no-array-index-key': 'off',
'react/jsx-no-useless-fragment': 'off',
'no-unused-expressions': 'off',
'react/jsx-props-no-spreading': 'off',
'react/no-unused-prop-types': 'off',
'import/no-extraneous-dependencies': 'off',
},
settings: {
'import/resolver': {
Expand Down
Loading
Loading