Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
547cb63
[feat] default setting
SBSun Jan 18, 2025
e0ccd8b
[feat] cicd pipeline
SBSun Jan 18, 2025
0d647b4
feat: jooq & product domain default setting (#1)
SBSun Jan 18, 2025
30677d5
feat: 응답 로직 개선 (공통 처리) (#2)
wichan7 Jan 19, 2025
08b8f69
feat: product 관련 entity 추가 (#3)
SBSun Jan 19, 2025
deaa875
fix: swagger-ui가 잘못 처리되는 현상 수정
wichan7 Jan 19, 2025
92ac459
fix: swagger-ui가 잘못 처리되는 현상 수정 (#4)
wichan7 Jan 19, 2025
56838c3
feat: add product api (#5)
SBSun Jan 25, 2025
2fbbc82
fix: resolve jooq build error (#6)
SBSun Jan 25, 2025
6262bf2
Feat/submodule (#7)
wichan7 Jan 25, 2025
cc30a58
feat: update submodule (#8)
wichan7 Jan 25, 2025
5656c62
feat: logback (#9)
SBSun Jan 26, 2025
448334c
feat: auth (#10)
wichan7 Jan 26, 2025
cf38d77
feat: discord error log appender (#11)
SBSun Jan 26, 2025
25fe7dd
fix: 존재하는 api 경로만 error log 전송하도록 수정 (#12)
SBSun Jan 27, 2025
7d4e504
feat: AuthResolver (#13)
wichan7 Jan 27, 2025
b35e1d0
refactor: 경로 복수형으로 변경 및 swagger 파라미터 hidden (#14)
wichan7 Jan 27, 2025
670598c
refactor: PR(#13) (#15)
wichan7 Jan 28, 2025
e2fa85d
feat(auth): validation (#16)
wichan7 Jan 28, 2025
6fc31d1
refactor(log): stacktrace를 파라미터로 하는 오버로딩 함수 추가 (#17)
wichan7 Jan 28, 2025
9a1e2fc
feat: 이메일 중복여부 조회 (#18)
wichan7 Jan 30, 2025
fca2177
chore: update configurations for JWT (#19)
wichan7 Jan 30, 2025
df80f41
feat(auth): 비밀번호 변경 (#20)
wichan7 Jan 30, 2025
a782a2e
refactor(pr20): rename chpw to changePassword (#21)
wichan7 Feb 1, 2025
6d367e3
refactor: product domain 수정 (#22)
SBSun Feb 6, 2025
40657c0
fix: deploy에서 모든 컨테이너를 종료시키는 문제 해결 (#23)
SBSun Feb 6, 2025
71e68ad
feat: auto modify(자동 수정) sse 통신으로 구현 (#25)
SBSun Feb 8, 2025
7ff6558
feat(terms): 회원 가입 시 약관 동의에 대한 정의 추가 (#26)
wichan7 Feb 10, 2025
4df9dbd
refactor: memo table 구조 및 api 수정 (#27)
SBSun Feb 13, 2025
3bdb0e3
feat(email): 회원가입/비밀번호 재설정 이메일 컨텐츠 추가 (#28)
wichan7 Feb 14, 2025
28ec7c3
feat: 로그아웃 (#29)
wichan7 Feb 16, 2025
263fc14
feat(terms): 약관 조회 (#30)
wichan7 Feb 19, 2025
f6a1a24
feat: 필수 약관 동의 여부 조회 (#31)
wichan7 Feb 22, 2025
cf64fbe
refactor: terms_agree -> terms_agreement 로 변경 (#32)
wichan7 Feb 23, 2025
dd54299
feat: 인증 시 약관, 약관 목록 조회 api
wichan7 Feb 23, 2025
6b3b1e7
feat: 로그인 시 시도횟수 검증 로직 추가 (#34)
wichan7 Mar 1, 2025
4bcbcf9
refactor: auto modify에 template 정보 적용 (#35)
SBSun Mar 1, 2025
bded67a
feat: user modify(수동 수정) api 연동 (#36)
SBSun Mar 5, 2025
337e201
feat: feedback api 연동 및 multi module 적용 (#37)
SBSun Mar 8, 2025
6c530bd
fix: discord appender load error (#38)
SBSun Mar 8, 2025
f3f3c81
fix: private method 에서 transactional 어노테이션 삭제 (#39)
wichan7 Mar 8, 2025
ad47b2b
feat: Add assistant research(자유 대화) api (#40)
SBSun Mar 9, 2025
047b06d
feat: Add assistant evaluation(평가) api (#41)
SBSun Mar 9, 2025
5a2aae6
feat: s3 파일 업로드 api (presigned-url) (#42)
wichan7 Mar 10, 2025
014497a
refactor: Modify res structure for get product list (#43)
SBSun Mar 11, 2025
0b7c8cd
feat: document embedding API 연동 (#44)
SBSun Mar 13, 2025
5eb06f2
feat: spring security (#45)
wichan7 Mar 16, 2025
f783b7e
fix: AI 어시 기능 단계별 상태 저장 기능 수정 (#46)
SBSun Mar 20, 2025
5302ce8
fix: 비밀번호 규칙, swagger 수정 (#47)
wichan7 Mar 22, 2025
c624d9a
feat: 자유 대화 API 연동 (#48)
SBSun Mar 22, 2025
d3eb792
feat: let's encrypt 자동 인증서 갱신 적용 (#49)
wichan7 Mar 22, 2025
0573cac
feat: Integrate research API with chat service (#50)
SBSun Mar 22, 2025
8c525b3
feat: Apply security to product and assistant APIs (#51)
SBSun Mar 22, 2025
110062f
fix: cert 갱신 스케쥴 변경 (#52)
wichan7 Mar 23, 2025
c278fe2
feat: add auth header button to swagger (#53)
wichan7 Mar 23, 2025
94f7be9
fix: 비밀번호 변경 이메일 파라미터명 변경 (#54)
wichan7 Mar 25, 2025
aa5f1e3
feat: 닉네임 중복조회 API 기능 추가 및 인증 이슈 수정 (#55)
wichan7 Mar 26, 2025
cac8935
fix: Update product response structure (#56)
SBSun Mar 28, 2025
042aad6
fix: transaction error in Assistant API WebClient (#57)
SBSun Mar 30, 2025
125eb5e
feat: Add get assistant histories API (#58)
SBSun Mar 31, 2025
e31ac1c
fix: RefreshToken을 쿠키로 설정하도록 변경 (#59)
wichan7 Mar 31, 2025
b781561
fix: cors allowlist 추가 (#60)
wichan7 Mar 31, 2025
5b3a4b4
fix: logout security config 순서 변경 (#61)
wichan7 Mar 31, 2025
32b7106
fix: 필수 약관 동의 추가 (#62)
wichan7 Apr 1, 2025
e219f54
feat: Add product favorite prompt APIs (#63)
SBSun Apr 1, 2025
95000eb
feat: Add pagination to get product histories API (#64)
SBSun Apr 2, 2025
59cbc56
style: 이메일 문구 변경 (#65)
wichan7 Apr 2, 2025
70e6a03
fix: 로그인 관련 에러메시지 처리 (#66)
wichan7 Apr 5, 2025
82184cc
fix: 이미지 타임존 설정 (#67)
wichan7 Apr 5, 2025
752be3a
Fix/timezone (#68)
wichan7 Apr 5, 2025
733dba5
style: 로그인 5회 경고 에러 메시지 수정 (#69)
wichan7 Apr 5, 2025
787917d
refactor: availableLoginAt -> loginAvailableAt 응답 변경 (#70)
wichan7 Apr 5, 2025
6d17929
feat: add assistant planner generate API (#71)
SBSun Apr 7, 2025
ba35b02
fix: 로그인 이력이 없을 때 발생하는 오류 수정 (#72)
wichan7 Apr 7, 2025
37f11a0
refactor: change get assistant histories API to cursor pagination wit…
SBSun Apr 7, 2025
c10005b
fix: send mail asynchronously (#74)
wichan7 Apr 9, 2025
57d6c9d
fix: modify query condition for assistant histories (#75)
SBSun Apr 9, 2025
d3d72a6
feat: add isFavoritedPrompt field to assistant histories response (#76)
SBSun Apr 11, 2025
698b9f3
fix: favorite prompt delete not working (#77)
SBSun Apr 11, 2025
43c7dd5
fix: resolve assistant APIs error (#78)
SBSun Apr 12, 2025
1229202
feat: add tomcat configurations for logging (#79)
wichan7 Apr 13, 2025
6a98eb5
feat: add product fixed message APIs (#80)
SBSun Apr 16, 2025
eca808c
fix: resolve get planner api issue (#81)
SBSun Apr 23, 2025
745791a
fix: 어시트턴트 사용 내역 조회에서 웹 검색 사용 내역이 조회되지 않는 이슈 해결 (#82)
SBSun Apr 26, 2025
7ff8394
feat: 어시스턴트 사용 내역 응답에 평가 데이터 추가 (#83)
SBSun Apr 28, 2025
362c829
feat: setup env for production (#84)
wichan7 Apr 30, 2025
b3b7e58
feat: 동기 방식 assistant APIs 연동 (#85)
SBSun May 5, 2025
a05bc98
feat: update submodule to change mail sender (#86)
wichan7 May 9, 2025
0171f53
fix: assistant 답변 평가 시, feedbackType 저장되게 수정 (#87)
SBSun May 10, 2025
6fb6811
fix: assistant 답변 영구 보관 API 구현 (#88)
SBSun May 11, 2025
a3af552
fix: 어시스턴트 이력이 pagination 기준 값을 포함하여 응답하도록 수정 (#89)
wichan7 May 14, 2025
d924db2
feat: 메모 완료 여부 수정 API 구현 (#90)
SBSun May 19, 2025
3ea3d93
feat: cors 추가 및 이메일 전송 web-url 환경변수로 관리 (#91)
wichan7 May 27, 2025
831caff
feat: initialize amplitude SDK (#92)
wichan7 May 31, 2025
87e4240
feat: apply amplitude events [part 2] (#93)
wichan7 May 31, 2025
ff03d01
feat: assistant 기능에 설정 반영 여부 적용 (#94)
SBSun Jun 3, 2025
f87a332
feat: 작품 목록 응답 DTO에 생성일시 필드 추가 (#95)
SBSun Jun 5, 2025
0f6741d
config: accessToken 만료시간 임시 변경 (#96)
wichan7 Jun 8, 2025
e7a22f7
feat: createMemo가 id를 반환하도록 수정 (#97)
wichan7 Jun 8, 2025
148367a
fix: 비밀번호 변경 링크 잘못 보내지는 현상 수정 (#98)
wichan7 Jun 8, 2025
3669ed6
fix: research API 연동 오류 해결 (#99)
SBSun Jun 11, 2025
17de35e
fix: 비밀번호 정규식 변경 (#100)
wichan7 Jun 12, 2025
c66db9d
fix: 로그인 비밀번호 정규식 제거 & 액세스 토큰 만료 기한 변경 (#101)
wichan7 Jun 14, 2025
2308dca
fix: 로그인 비밀번호 유효성 검증 제거 (#102)
wichan7 Jun 14, 2025
67ad86c
fix: TLS 재발급 워크플로우 버그 수정 (#103)
wichan7 Jun 14, 2025
a059b86
chore: 인증 추적을 위한 로깅 추가 (#104)
wichan7 Jun 14, 2025
5140337
feat: 운영 db 분리 및 ssl 설정 (#105)
wichan7 Jun 16, 2025
ba1b118
fix: workflow (#106)
wichan7 Jun 16, 2025
a9aabc9
fix: workflow (#108)
wichan7 Jun 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
21 changes: 21 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build Test

on:
pull_request:
branches: [ "develop", "stage", "main" ]

jobs:
build-test:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3

- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'

- name: Build with Gradle
run: chmod +x gradlew && ./gradlew build -x test
87 changes: 87 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Deploy

on:
push:
branches: [ "develop", "main" ]

permissions:
contents: read

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
with:
submodules: true
token: ${{ secrets.GH_PAT }}

- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'

- name: Gradle Caching
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Build with Gradle
run: chmod +x gradlew && ./gradlew build -x test

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Login to Amazon ECR
run: aws ecr get-login-password --region ${{ secrets.AWS_REGION }} | docker login --username AWS --password-stdin ${{ secrets.ECR_REGISTRY_URI }}

- name: Docker build & push to ECR (develop)
if: github.ref == 'refs/heads/develop'
run: docker build -t ${{ secrets.ECR_REGISTRY_URI }}:dev -f Dockerfile-dev --push .

- name: Docker build & push to ECR (production)
if: github.ref == 'refs/heads/main'
run: docker build -t ${{ secrets.ECR_REGISTRY_URI }}:prod -f Dockerfile-prod --push .

- name: Server Deploy (develop)
if: github.ref == 'refs/heads/develop'
run: |
aws ssm send-command \
--document-name "AWS-RunShellScript" \
--instance-ids "${{ secrets.EC2_INSTANCE_ID }}" \
--parameters commands='[
"aws ecr get-login-password --region ${{ secrets.AWS_REGION }} | docker login --username AWS --password-stdin ${{ secrets.ECR_REGISTRY_URI }}",
"cd /root",
"[ $(docker ps --filter 'publish=443' -q | wc -l) -gt 0 ] && docker stop $(docker ps --filter 'publish=443' -q)",
"[ $(docker images -q ${{ secrets.ECR_REGISTRY_URI }}:dev | wc -l) -gt 0 ] && docker rmi ${{ secrets.ECR_REGISTRY_URI }}:dev",
"docker pull ${{ secrets.ECR_REGISTRY_URI }}:dev",
"docker run --rm -d -p 443:443 --name writely-api -v /writely/logs:/writely/logs -v /etc/letsencrypt/live/dev-api.writeon.ai.kr:/writely/cert ${{ secrets.ECR_REGISTRY_URI }}:dev"
]' \
--comment "Deploying Docker container (develop)"

- name: Server Deploy (production)
if: github.ref == 'refs/heads/main'
run: |
aws ssm send-command \
--document-name "AWS-RunShellScript" \
--instance-ids "${{ secrets.EC2_INSTANCE_ID_PROD }}" \
--parameters commands='[
"aws ecr get-login-password --region ${{ secrets.AWS_REGION }} | docker login --username AWS --password-stdin ${{ secrets.ECR_REGISTRY_URI }}",
"cd /root",
"[ $(docker ps --filter 'publish=443' -q | wc -l) -gt 0 ] && docker stop $(docker ps --filter 'publish=443' -q)",
"[ $(docker images -q ${{ secrets.ECR_REGISTRY_URI }}:prod | wc -l) -gt 0 ] && docker rmi ${{ secrets.ECR_REGISTRY_URI }}:prod",
"docker pull ${{ secrets.ECR_REGISTRY_URI }}:prod",
"docker run --rm -d -p 443:443 --name writely-api -v /writely/logs:/writely/logs -v /etc/letsencrypt/live/api.writeon.ai.kr:/writely/cert ${{ secrets.ECR_REGISTRY_URI }}:prod"
]' \
--comment "Deploying Docker container (production)"
66 changes: 66 additions & 0 deletions .github/workflows/schedule-for-refresh-certification.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Schedule for refresh certification

on:
schedule:
- cron: "0 15 1 * *"
workflow_dispatch:

jobs:
run-script:
runs-on: ubuntu-latest
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Login to Amazon ECR
run: aws ecr get-login-password --region ${{ secrets.AWS_REGION }} | docker login --username AWS --password-stdin ${{ secrets.ECR_REGISTRY_URI }}

- name: Refresh let's encrypt certification (develop)
run: |
aws ssm send-command \
--document-name "AWS-RunShellScript" \
--instance-ids "${{ secrets.EC2_INSTANCE_ID }}" \
--parameters commands='[
"docker run --rm --name writeon-certbot -p 80:80 -v \"/etc/letsencrypt:/etc/letsencrypt\" -v \"/var/lib/letsencrypt:/var/lib/letsencrypt\" certbot/certbot certonly --standalone --force-renewal -d dev-api.writeon.ai.kr",
"cd /etc/letsencrypt/live/dev-api.writeon.ai.kr",
"openssl pkcs12 -export -in fullchain.pem -inkey privkey.pem -out keystore.p12 -CAfile chain.pem -caname root -password pass:${{ secrets.TLS_KEYSTORE_PASSWORD }}"
]' \
--comment "Refresh let's encrypt certification"

- name: Restart API Server (develop)
run: |
aws ssm send-command \
--document-name "AWS-RunShellScript" \
--instance-ids "${{ secrets.EC2_INSTANCE_ID }}" \
--parameters commands='[
"[ $(docker ps --filter 'publish=443' -q | wc -l) -gt 0 ] && docker stop $(docker ps --filter 'publish=443' -q)",
"docker run --rm -d -p 443:443 --name writely-api -v /writely/logs:/writely/logs -v /etc/letsencrypt/live/dev-api.writeon.ai.kr:/writely/cert ${{ secrets.ECR_REGISTRY_URI }}:dev"
]' \
--comment "Restart API Server for apply new certification"

- name: Refresh let's encrypt certification (production)
run: |
aws ssm send-command \
--document-name "AWS-RunShellScript" \
--instance-ids "${{ secrets.EC2_INSTANCE_ID_PROD }}" \
--parameters commands='[
"docker run --rm --name writeon-certbot -p 80:80 -v \"/etc/letsencrypt:/etc/letsencrypt\" -v \"/var/lib/letsencrypt:/var/lib/letsencrypt\" certbot/certbot certonly --standalone --force-renewal -d api.writeon.ai.kr",
"cd /etc/letsencrypt/live/api.writeon.ai.kr",
"openssl pkcs12 -export -in fullchain.pem -inkey privkey.pem -out keystore.p12 -CAfile chain.pem -caname root -password pass:${{ secrets.TLS_KEYSTORE_PASSWORD }}"
]' \
--comment "Refresh let's encrypt certification"

- name: Restart API Server (production)
run: |
aws ssm send-command \
--document-name "AWS-RunShellScript" \
--instance-ids "${{ secrets.EC2_INSTANCE_ID_PROD }}" \
--parameters commands='[
"[ $(docker ps --filter 'publish=443' -q | wc -l) -gt 0 ] && docker stop $(docker ps --filter 'publish=443' -q)",
"docker run --rm -d -p 443:443 --name writely-api -v /writely/logs:/writely/logs -v /etc/letsencrypt/live/api.writeon.ai.kr:/writely/cert ${{ secrets.ECR_REGISTRY_URI }}:prod"
]' \
--comment "Restart API Server for apply new certification"
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
HELP.md
.gradle
build/
db/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/
Expand Down Expand Up @@ -37,3 +38,6 @@ out/
.vscode/
*.log
*.pid

### secrets ###
application*.yml
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "BE-secret"]
path = BE-secret
url = https://github.com/WritelyForWriters/BE-secret.git
1 change: 1 addition & 0 deletions BE-secret
Submodule BE-secret added at 73f119
10 changes: 10 additions & 0 deletions Dockerfile-dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM openjdk:21-jdk-slim

WORKDIR /writeon

ENV TZ=Asia/Seoul
RUN ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime

COPY api/build/libs/*.jar writeon.jar

ENTRYPOINT ["java", "-Dspring.profiles.active=dev", "-jar", "writeon.jar"]
10 changes: 10 additions & 0 deletions Dockerfile-prod
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM openjdk:21-jdk-slim

WORKDIR /writeon

ENV TZ=Asia/Seoul
RUN ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime

COPY api/build/libs/*.jar writeon.jar

ENTRYPOINT ["java", "-Dspring.profiles.active=prod", "-jar", "writeon.jar"]
42 changes: 42 additions & 0 deletions api/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-webflux'

/* Mail */
implementation 'org.springframework.boot:spring-boot-starter-mail'

/* Template engine */
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'nz.net.ultraq.thymeleaf:thymeleaf-layout-dialect'

/* AWS SDK */
implementation 'software.amazon.awssdk:s3:2.30.31'
implementation("software.amazon.awssdk:netty-nio-client:2.30.31")

/* amplitude (tracking tool) */
implementation 'org.json:json:20201115'
implementation 'com.amplitude:java-sdk:1.+'

/* Swagger */
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0'

implementation 'io.netty:netty-resolver-dns-native-macos:4.1.68.Final:osx-aarch_64'

implementation project(':assistant-api-client')
implementation project(':domain')
}

jar {
enabled = false
}

task copySecret(type: Copy) {
copy {
from '../BE-secret/api'
include "*.yml"
into 'src/main/resources'
}
}

tasks.named('bootJar') {
mainClass = 'writeon.api.ApiApplication'
}
28 changes: 28 additions & 0 deletions api/src/main/java/writeon/api/ApiApplication.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package writeon.api;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.data.redis.repository.configuration.EnableRedisRepositories;

@SpringBootApplication
@ComponentScan(basePackages = {"writeon.api", "writeon.assistantapiclient"})
@EntityScan(basePackages = "writeon.domain")
@EnableJpaRepositories(
basePackages = "writeon.domain",
includeFilters = @ComponentScan.Filter(type = FilterType.REGEX, pattern = ".*JpaRepository")
)
@EnableRedisRepositories(
basePackages = "writeon.domain",
includeFilters = @ComponentScan.Filter(type = FilterType.REGEX, pattern = ".*RedisRepository")
)
public class ApiApplication {

public static void main(String[] args) {
SpringApplication.run(ApiApplication.class, args);
}

}
24 changes: 24 additions & 0 deletions api/src/main/java/writeon/api/HealthCheckController.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package writeon.api;

import writeon.api.common.enums.exception.ParameterException;
import writeon.api.common.exception.BaseException;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/health-check")
@Tag(name = "health-check")
public class HealthCheckController {

@GetMapping
public void healthCheck() {
}

@GetMapping("/error")
public void error(@RequestParam String id) {
throw new BaseException(ParameterException.PARAMETER_INVALID);
}
}
Loading
Loading