Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
18149cf
feature: api service 함수 구현
JongHyeok-Park Nov 27, 2024
6175884
fix: api post 리스트로 제네릭 수정
JongHyeok-Park Nov 27, 2024
17dc481
feat: Home 페이지에 데이터 연동하여 레이아웃 표시 구현
JongHyeok-Park Nov 27, 2024
9fcd516
feat: 게시글 조회 응답에 태그 추가
sapsalian Nov 28, 2024
2c5a4ac
feat: 해시태그별 게시글 조회 구현 완료
sapsalian Nov 28, 2024
0b7cf9d
refactor: categoryTree 클래스 리팩토링
sapsalian Nov 28, 2024
52b5677
feat: 게시글 관련 엔티티 정의 (#5)
peanut990 Nov 28, 2024
5097b78
style: import static 추가 (#5)
peanut990 Nov 28, 2024
7be7b94
feat: Post,PostHashTag ID 생성 전략 명시 (#5)
peanut990 Nov 28, 2024
d654783
feat: PostItem 카테고리 기능 추가
JongHyeok-Park Nov 28, 2024
46c9f97
feat: Post,PostHashTag 생성자추가 (#5)
peanut990 Nov 29, 2024
891da2d
feat: 특정 카테고리에 해당하는 해쉬태그 목록 조회 서비스 구현 (#5)
peanut990 Nov 29, 2024
4ce2649
feat: 특정 카테고리에 해당하는 해쉬태그 목록 조회 컨트롤러 구현 (#5)
peanut990 Nov 29, 2024
c91e106
Merge branch 'develop' into feature/5-home-page
JongHyeok-Park Dec 2, 2024
69e1091
feat: 게시글 조회 응답에 태그 추가
sapsalian Nov 28, 2024
e9e14a6
feat: 해시태그별 게시글 조회 구현 완료
sapsalian Nov 28, 2024
06e7e93
refactor: categoryTree 클래스 리팩토링
sapsalian Nov 28, 2024
d77cbe4
feat: 게시글 조회에 페이징 기능 추가
sapsalian Dec 2, 2024
d99e3c7
Merge pull request #30 from DevBadgers/feature/5-hashtag-by-category
peanut990 Dec 2, 2024
a177f6a
refactor: 공통 API반환 형식으로 반환하도록 수정(#5)
peanut990 Dec 2, 2024
d09caef
refactor: 사용되지 않는 dto 삭제 (#5)
peanut990 Dec 2, 2024
179150b
Remove application.properties from version control
peanut990 Dec 2, 2024
9861233
Merge pull request #32 from DevBadgers/feature/5-home-page
JongHyeok-Park Dec 2, 2024
01b6d9d
refactor: 카테고리 타입 정의 파일 위치 변경
hanguswls Dec 2, 2024
13540ed
refactor: 카테고리 id 타입 수정 및 적용
hanguswls Dec 2, 2024
64af5eb
feat: 카테고리 데이터 API 연동
hanguswls Dec 2, 2024
f6d7676
refactor: API 응답 데이터 변수명을 categories로 변경
hanguswls Dec 2, 2024
c47b086
refactor: 카테고리 클릭 시 이동할 URL 구조 변경
hanguswls Dec 2, 2024
48504fa
fix: Home.tsx 빌드 에러 해결을 위한 styled-components 삭제 및 미사용코드 주석 처리
hanguswls Dec 2, 2024
057c5eb
Merge pull request #33 from DevBadgers/feature/5-search-posts-paging
sapsalian Dec 3, 2024
3692ba4
Merge branch 'develop' into feature/5-search-posts-by-hashtag
sapsalian Dec 3, 2024
e2750f0
Merge pull request #29 from DevBadgers/feature/5-search-posts-by-hashtag
sapsalian Dec 3, 2024
ef817d6
refactor: 파일 구조 변경 및 dto이름 변경 (#5)
peanut990 Dec 3, 2024
d4133f6
feat: 해쉬태그 수정 및 삭제 기능 (#5)
peanut990 Dec 3, 2024
1f4a7cf
feat: 해쉬태그 수정 및 삭제 API 완성 (#5)
peanut990 Dec 3, 2024
4852ac8
Merge pull request #34 from DevBadgers/refactor/5-category
peanut990 Dec 3, 2024
2e7ec3d
Merge pull request #35 from hanguswls/feature/5-category
hanguswls Dec 4, 2024
dfe4116
feat: 태그별 글 조회 api(#5)
Dec 5, 2024
e9d1e19
feat: selectedTag 스타일 추가, 태그의 id를 props에 추가
Dec 5, 2024
9243a0e
feat: useTag 훅 구현
Dec 5, 2024
0781f4f
feat: Home에서 TagWrapper, useTag 추가
Dec 5, 2024
31191cb
Merge pull request #37 from thanhhien234/feature/5-tag-api
hanguswls Dec 6, 2024
003277c
refactor: Tag 타입을 TagWrapper에서 types 디렉토리로 이동
hanguswls Dec 6, 2024
4c0ee28
feat: 카테고리별 태그리스트 조회 기능 구현
hanguswls Dec 6, 2024
c804eba
Merge pull request #36 from DevBadgers/feature/5-hashtag-update
peanut990 Dec 6, 2024
b42a84e
Merge pull request #39 from hanguswls/feature/5-hashtag
thanhhien234 Dec 6, 2024
47e4111
fix: 태그별 글 목록 조회 api 수정
Dec 6, 2024
93be2c6
Merge pull request #40 from thanhhien234/fix/5-posts-tag
hanguswls Dec 8, 2024
65341ba
fix: Tag 타입 오류
hanguswls Dec 8, 2024
74f513f
fix: 경로 수정
hanguswls Dec 8, 2024
a61d0d8
refactor: src/components, src/assets 경로 path alias 적용
hanguswls Dec 8, 2024
a580c6b
refactor: src/services 경로 path alias 생성 및 적용
hanguswls Dec 8, 2024
673a9ed
chore: categories 오타 수정
hanguswls Dec 8, 2024
a4eb469
feat: 페이지 번호를 누르면 해당 페이지로 이동
hanguswls Dec 8, 2024
86fe184
Merge pull request #41 from hanguswls/refactor/5-front
hanguswls Dec 9, 2024
cc541db
feat CD for main branch
peanut990 Dec 25, 2024
fa83692
feat spring CI
peanut990 Dec 25, 2024
fdc233e
refactor deploy.yml to .github/workflows/deploy.yml
peanut990 Dec 25, 2024
6137724
feat: spring CD
peanut990 Dec 25, 2024
8cb7c52
feat: nestjs CI
peanut990 Dec 25, 2024
bbe1a35
feat: nestjs CD
peanut990 Dec 25, 2024
06ad859
feat: 포스트 하단에 해시태그 표시 영역 추가
hanguswls Dec 27, 2024
3bad7ba
fix: PostItem의 categoryHier 타입 수정
hanguswls Dec 27, 2024
984260e
feat: cors 헤더 추가
peanut990 Dec 29, 2024
ac23ca6
Merge pull request #44 from hanguswls/develop
thanhhien234 Dec 29, 2024
352542b
feat: footer fixed position at bottom(#4)
Dec 29, 2024
c2f3507
feat: add create-post route(#4)
Dec 29, 2024
dd22b9a
feat: CategorySelector 컴포넌트 구현(#4)
Dec 29, 2024
c15be7e
style: CategorySelectorContainer to the left(#4)
Dec 29, 2024
b251a39
feat: CreatePost 페이지 레이아웃(#4)
Dec 29, 2024
8bb9f77
feat: reset category name when selecting (#4)
Dec 29, 2024
2a5064c
feat: S3 설정 및 이미지 업로드,삭제 기능 구현 (#4)
peanut990 Dec 30, 2024
384471b
feat: 게시글 이미지 업로드 및 삭제 기능 (#4)
peanut990 Dec 30, 2024
53be100
feat: cors 허용 도메인추가
peanut990 Dec 30, 2024
40103e3
refactor: 카테고리 테이블명, 관련 엔드포인트 수정
peanut990 Dec 31, 2024
0a44953
refactor: 이미지 업로드 후 경로 반환시 DTO를 사용하도록 변경 (#4)
peanut990 Dec 31, 2024
8e273a0
feat: s3 업로드 기능 테스트 코드 추가 (#4)
peanut990 Dec 31, 2024
92053ed
refactor: 파일 위치 이동, 테스트 코드 엔드포인트 수정 (#4)
peanut990 Dec 31, 2024
147bae9
feat: 파일 업로드 컨트롤러 및 서비스 단위 테스트 추가 (#4)
peanut990 Dec 31, 2024
0cb99f9
feat: 글 작성 컨트롤러 구현 및 요청 DTO 정의 (#4)
peanut990 Dec 31, 2024
d9ae235
feat: 게시글 작성 서비스 로직 구현 (#4)
peanut990 Dec 31, 2024
c94d6de
Merge pull request #46 from thanhhien234/feature/create-post-4
hanguswls Dec 31, 2024
4a7bffa
style: App.css에 배경색 추가
hanguswls Jan 1, 2025
ce7d48b
feat: EditorContainer 컴포넌트 구현 및 스타일링
hanguswls Jan 1, 2025
37555b0
feat: NicknamePasswordInput 컴포넌트 구현 및 스타일링
hanguswls Jan 1, 2025
0b79352
fix: FooterContainer의 position: fixed 삭제
hanguswls Jan 1, 2025
ebf4789
feat: 저장 버튼 컴포넌트 추가
hanguswls Jan 1, 2025
a4e57f7
chore: 마크다운에 필요한 의존성 추가
hanguswls Jan 1, 2025
2a8c6d1
fix: 빌드를 위해 types path alias 제거
hanguswls Jan 1, 2025
09122f7
Merge pull request #45 from DevBadgers/feature/cors
sapsalian Jan 1, 2025
5a0bd4f
Merge pull request #43 from DevBadgers/feature/CICD
sapsalian Jan 1, 2025
a1e51c1
fix: s3Client 의 빈 등록이 잘못 설정되어 테스트 실행이 실패하는 현상 수정 (#4)
peanut990 Jan 2, 2025
519fcf2
feat: 테스트 코드 실행시 테스트용 설정파일을 사용하도록 수정
peanut990 Jan 2, 2025
5a93216
feat: 서버 배포시 환경 설정 파일도 배포되는 기능
peanut990 Jan 3, 2025
1e61357
Merge branch 'feature/4-uploadImage' into feature/4-write-post
peanut990 Jan 3, 2025
1aa99b4
refactor: 테스트 코드 수정 (#4)
peanut990 Jan 3, 2025
8fde46f
feat: 글 게시 기능 테스트 코드 작성 (#4)
peanut990 Jan 3, 2025
bba322d
feat: 글 게시 기능 테스트 코드 작성, 스웨거 추가 (#4)
peanut990 Jan 3, 2025
6da1d45
Merge pull request #47 from hanguswls/feature/4-markdown-editor
hanguswls Jan 3, 2025
a4a2878
Merge pull request #49 from DevBadgers/feature/spring-CI
sapsalian Jan 3, 2025
c9597f2
refactor: 사용되지 않는 생성자 제거, 빌더 생성자 제거 (#4)
peanut990 Jan 3, 2025
4eff355
refactor: 테스트 코드 수정 (#4)
peanut990 Jan 3, 2025
d7d4b2d
feat: 예외 핸들러에 예외 추가, 에러 메시지 상수화
peanut990 Jan 3, 2025
d4abef0
Merge pull request #52 from DevBadgers/feature/4-write-post
peanut990 Jan 5, 2025
0edb672
feat: icon 추가(#4)
Jan 5, 2025
fe8181a
feat: 태그 추가 영역 구현(#4)
Jan 5, 2025
3875387
Merge pull request #53 from thanhhien234/feature/tag-4
hanguswls Jan 6, 2025
cba16c6
refactor: 정렬 기능 삭제
hanguswls Jan 6, 2025
13962a8
refactor: 코드블럭의 하이라이팅 라이브러리 변경 및 마크다운의 컴포넌트 분리
hanguswls Jan 6, 2025
82c57b5
refactor: 버튼 클릭 시 에디터와 프리뷰를 전환하도록 변경
hanguswls Jan 6, 2025
06c069f
refactor: #f0f0f0 대신 CSS 변수(--hover-background-color) 사용
hanguswls Jan 6, 2025
9b386d7
fix: prismjs import문과 하이라이팅 코드를 EditorContainer.tsx에서 CodeBlock.tsx로 이동
hanguswls Jan 6, 2025
a9906b7
feat: 툴바 이미지 추가 및 변경
hanguswls Jan 6, 2025
d13b0cf
refactor: EditorContainer.tsx에서 MarkdownEditor로 이름 변경
hanguswls Jan 6, 2025
68a5e10
feat: Toolbar 분리 및 아이콘 클릭 시 마크다운 문법 적용 기능 추가
hanguswls Jan 6, 2025
4deae86
Merge pull request #54 from hanguswls/feature/4-refactor-markdown-editor
thanhhien234 Jan 7, 2025
1311c8c
feat: 이미지 선택하고 올리기(#4)
Jan 7, 2025
fc61e7d
fix: tagApi endpoint 수정(#4)
Jan 7, 2025
efe6aaf
feat: add FormData type in api's body(#4)
Jan 7, 2025
ceedf6b
feat: postImage api(#4)
Jan 7, 2025
072afd9
feat: postImage api 연동(#4)
Jan 7, 2025
c5eddd9
feat: 스웨거 UI 경로 수정 및 cors 허용 경로 수정
peanut990 Jan 8, 2025
ed0351d
Merge pull request #56 from DevBadgers/feature/swagger-ui
peanut990 Jan 8, 2025
ac2a429
feat: cors 허용 경로 수정
peanut990 Jan 8, 2025
8cb55c3
Merge pull request #57 from DevBadgers/feature/cors
peanut990 Jan 8, 2025
b8aee2b
fix: tagApi endpoint 수정(#4)
Jan 8, 2025
34f55eb
feat: 사진 업로드 api 수정(#4)
Jan 8, 2025
f440f37
fix: img 스타일 수정(#4)
Jan 8, 2025
53c4ff4
feat: add loading when uploading image(#4)
Jan 8, 2025
2ae8399
feat: LoadingModal 컴포넌트 구현(#4)
Jan 8, 2025
218f296
feat: store 구현, App에 로딩 추가(#4)
Jan 8, 2025
c93a220
fix: change loading initial value (#4)
Jan 8, 2025
964e005
Merge pull request #59 from thanhhien234/feature/loading
thanhhien234 Jan 8, 2025
8f8f8d2
feat: preview 사진 styled-component로 수정(#4)
Jan 8, 2025
611c61b
Merge pull request #55 from thanhhien234/feature/imageApi-4
thanhhien234 Jan 8, 2025
11110dc
feat: 글 데이터를 관리하는 useCreate 훅 생성(DevBadgers#4)
hanguswls Jan 9, 2025
8e1733a
refactor: CategorySelector 상태 관리 로직을 부모 컴포넌트로 이동 (DevBadgers#4)
hanguswls Jan 9, 2025
01aa580
refactor: author와 password 상태 관리 로직을 부모 컴포넌트로 이동 (DevBadgers#4)
hanguswls Jan 9, 2025
475975e
refactor: useMarkdownEditor 훅 리팩토링 및 props 기반 로직 개선(DevBadgers#4)
hanguswls Jan 9, 2025
ad9153e
refactor: CreatePost 컴포넌트에서 PostTitleInput과 MarkdownEditor 상태 연결 (Dev…
hanguswls Jan 9, 2025
1b18d71
refactor: MarkdownEditor 및 ToolBar의 핸들러 이름 변경 (DevBadgers#4)
hanguswls Jan 9, 2025
3bbc994
feat: 글 생성 API 함수 구현 및 타입 정의 추가(DevBadgers#4)
hanguswls Jan 9, 2025
be92a42
Merge pull request #60 from hanguswls/feature/4-save-post
hanguswls Jan 9, 2025
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
42 changes: 42 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Deploy on Merge to main

on:
pull_request:
types:
- closed
branches:
- main

jobs:
deploy:
name: Deploy to EC2
if: github.event.pull_request.merged == true # PR이 머지된 경우만 실행
runs-on: ubuntu-latest
concurrency:
group: deploy
cancel-in-progress: true # 이전 실행 중인 워크플로를 취소

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.EC2_SSH_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H "${{ vars.EC2_HOST }}" >> ~/.ssh/known_hosts

- name: Execute Deployment Script on EC2
run: |
ssh ec2-user@${{ vars.EC2_HOST }} << 'EOF'
cd /home/ec2-user/starchive/scripts

git checkout main
# 스프링 배포 스크립트 실행
./spring-deploy.sh

# nestjs 배포 스크립트 실행
./nestjs-deploy.sh

EOF
42 changes: 42 additions & 0 deletions .github/workflows/nestjs-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: NestJS Deploy on Merge to develop

on:
pull_request:
types:
- closed
branches:
- main
paths:
- 'BACK/nest-app/**'

jobs:
deploy:
name: Deploy to EC2
if: github.event.pull_request.merged == true # PR이 머지된 경우만 실행
runs-on: ubuntu-latest
concurrency:
group: deploy-nestjs
cancel-in-progress: true # 이전 실행 중인 워크플로를 취소

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.EC2_SSH_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H "${{ vars.EC2_HOST }}" >> ~/.ssh/known_hosts

- name: Execute Deployment Script on EC2
run: |
ssh ec2-user@${{ vars.EC2_HOST }} << 'EOF'
cd /home/ec2-user/starchive/scripts

git checkout develop

# nestjs 배포 스크립트 실행
./nestjs-deploy.sh

EOF
45 changes: 45 additions & 0 deletions .github/workflows/nestjs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: NestJS CI

on:
pull_request:
branches:
- develop
paths:
- 'BACK/nest-app/**'

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read

steps:
# 1. 코드 체크아웃
- uses: actions/checkout@v4

# 2. Node.js 설정
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '22' # 사용하려는 Node.js 버전
cache: 'npm'
cache-dependency-path: 'BACK/nest-app/package-lock.json'

# 3. 의존성 설치
- name: Install dependencies
run: |
cd BACK/nest-app/
npm install

# 4. NestJS 빌드
- name: Build the project
run: |
cd BACK/nest-app/
npm run build

# 5. 테스트 실행
#- name: Run tests
# run: |
# cd BACK/nest-app/
# npm run test
53 changes: 53 additions & 0 deletions .github/workflows/spring-delploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Spring Deploy on Merge to develop

on:
pull_request:
types:
- closed
branches:
- develop
paths:
- 'BACK/spring-app/**'

jobs:
deploy:
name: Deploy to EC2
if: github.event.pull_request.merged == true # PR이 머지된 경우만 실행
runs-on: ubuntu-latest
concurrency:
group: deploy-spring
cancel-in-progress: true # 이전 실행 중인 워크플로를 취소

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Create application properties files
run: |
mkdir -p BACK/spring-app/src/main/resources
echo "${{ secrets.APPLICATION_PROPERTIES_FOR_TEST }}" > BACK/spring-app/src/main/resources/application-test.properties
echo "${{ secrets.APPLICATION_PROPERTIES_FOR_PROD }}" > BACK/spring-app/src/main/resources/application-prod.properties

- name: Set up SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.EC2_SSH_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H "${{ vars.EC2_HOST }}" >> ~/.ssh/known_hosts

- name: Transfer properties files to EC2
run: |
scp BACK/spring-app/src/main/resources/application-test.properties ec2-user@${{ vars.EC2_HOST }}:/home/ec2-user/starchive/BACK/spring-app/src/main/resources/
scp BACK/spring-app/src/main/resources/application-prod.properties ec2-user@${{ vars.EC2_HOST }}:/home/ec2-user/starchive/BACK/spring-app/src/main/resources/


- name: Execute Deployment Script on EC2
run: |
ssh ec2-user@${{ vars.EC2_HOST }} << 'EOF'
cd /home/ec2-user/starchive/scripts

git checkout develop
# 스프링 배포 스크립트 실행
./spring-deploy.sh

EOF
41 changes: 41 additions & 0 deletions .github/workflows/spring-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Spring CI

on:
pull_request:
branches:
- develop
paths:
- 'BACK/spring-app/**'

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read

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

# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0

- name: Set application-test.properties
run: |
mkdir -p BACK/spring-app/src/main/resources
cat <<EOF > BACK/spring-app/src/main/resources/application-test.properties
${{ secrets.APPLICATION_PROPERTIES_FOR_TEST }}
EOF

- name: Build with Gradle
run: |
cd BACK/spring-app/
chmod +x ./gradlew
./gradlew build
35 changes: 30 additions & 5 deletions BACK/nest-app/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,46 @@ datasource db {
}

model Category {
categoryId BigInt @id @default(autoincrement()) // 기본 키
categoryId BigInt @id @default(autoincrement())
name String @db.VarChar(100)
parentId BigInt? // 상위 카테고리 (nullable)
parentId BigInt?

@@map("Categories") // 실제 테이블 이름과 매핑
posts Post[]

@@map("Categorys")
}

model Post {
postId BigInt @id @default(autoincrement()) // 기본 키
postId BigInt @id @default(autoincrement())
categoryId BigInt
title String @db.VarChar(64)
content String @db.Text
author String @db.VarChar(32)
password String @db.VarChar(128)
createAt DateTime

@@map("Posts") // 실제 테이블 이름과 매핑
category Category @relation(fields: [categoryId], references: [categoryId])
postHashTags PostHashTag[]

@@map("Posts")
}

model PostHashTag {
postHashTagId BigInt @id @default(autoincrement())
postId BigInt
hashTagId BigInt

post Post @relation(fields: [postId], references: [postId])
hashTag HashTag @relation(fields: [hashTagId], references: [hashTagId])

@@map("PostHashTag")
}

model HashTag {
hashTagId BigInt @id @default(autoincrement())
name String @db.VarChar(32)

postHashTags PostHashTag[]

@@map("HashTags")
}
21 changes: 13 additions & 8 deletions BACK/nest-app/src/post/post.controller.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
import { Controller, Get, Param, ParseIntPipe, Query } from '@nestjs/common';
import { Controller, Get, Query } from '@nestjs/common';
import { PostService } from './post.service';

@Controller('posts')
export class PostController {
constructor(private readonly postService: PostService) {}

@Get()
async getPostsByCategory(@Query('category') categoryId: string) {
// 카테고리 ID가 전달되지 않은 경우 전체 조회
if (!categoryId) {
return this.postService.getAllPosts();
}

return this.postService.getPostsByCategory(BigInt(categoryId));
async getPostsByCategory(
@Query('category') categoryId: string,
@Query('tag') hashTagId: string,
@Query('page') page: string = '1',
@Query('pageSize') pageSize: string = '10',
) {
return this.postService.getPosts(
categoryId ? BigInt(categoryId) : null,
hashTagId ? BigInt(hashTagId) : null,
parseInt(page, 10),
parseInt(pageSize, 10),
);
}
}
Loading
Loading