HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
🧚
[1기]최종 프로젝트 데브코스
/
💫
[팀16] YAS
/
🐶
백둥이
/
✨
API 설계_변민지
✨

API 설계_변민지

상태
기획
담당자
API 설계
도메인
기능
HTTP verbs
Path
응답&요청
완료
비고
게시판
게시글 등록
POST
/posts/{id}
완료
- id ⇒ routinePostId로 변경 - ?
게시판
게시글 삭제
DELETE
/posts/{id}
게시판
게시글 수정
PUT
/posts/{id}
- ?
게시판
게시글 단건 조회
GET
/posts/{id}
-
게시판
게시글 전체 조회
GET
/users/{id}/posts
게시판
내가 쓴 게시글 조회
GET
/users/{id}/posts
완료
백둥이가 수정할 예정
게시판
게시글 신규 루틴 조회
GET
게시판
게시글 인기 루틴 조회
GET
게시판
게시판
좋아요
*게시글 좋아요 등록
POST
/users/{id}/posts/{id}/likes
완료
- postLikeId 추가 - author ⇒ userId로 변경
게시판
좋아요
*게시글 좋아요 삭제
DELETE
/users/{id}/posts/{id}/likes
게시판
댓글
게시글 댓글 등록
POST
/posts/{id}/comments
완료
- id ⇒ commentId로 변경 - 대댓글 comments 제거
게시판
댓글
게시글 댓글 삭제
DELETE
/posts/{id}/comments/{id}
게시판
댓글
게시글 댓글 수정
PUT
/posts/{id}/comments/{id}
게시판
댓글
좋아요
*게시글 댓글 좋아요 등록
POST
/users/{id}/posts/{id}/comments/{id}/likes
완료
- commentLikeId 추가 - author ⇒ userId로 변경
게시판
댓글
좋아요
*게시글 댓글 좋아요 삭제
DELETE
/users/{id}/posts/{id}/comments/{id}/likes
 
 
 
 
 
백둥이~~!
  • (필요) 날짜별로 완료한 루틴 상세 조회 (응답 routine)에 대한 API요청이 필요할 것 같습니다.
  • 루틴완료 날짜별 상세 조회 , 루틴완료 날짜별 전체 조회(응답 routineCompletion)
    • 필요 없지 않을까요!?
 
  • (필요) 날짜별 완료한 루틴의 루틴완료 정보 조회
    • 날짜 / 루틴ID 을 주면 해당 날짜의 루틴 완료정보를 받아오는 API요청
 
나의 루틴 페이지
  • 전체 루틴 탭에서는 모든 루틴이 보인다
    • 월, 수, 금에 수행할 루틴인데 화요일에 누른다면 블러 처리 또는 alert 처리
      • 오늘은 수행하지 않아도 되는 루틴입니다!
  • 해야할 루틴에는 해당 요일 + Done이 false인 루틴만 렌더링
  • 완료한 루틴에는 해당 요일 + Done이 true인 루틴만 렌더링
 
  • 좋아요 테이블이 따로 있을까요!?
 
 

🏞 프론트 모델 타입

export interface UserType { userId: number; userName: string; nickName: string; profileImageUrl: string; email: string; } // 가안 // export interface UserType2 { // userId: number; // userName: string; // nickName: string; // profileImageUrl: string; // email: string; // likePosts: [postId, postId]; // likeComments: [commentId, commentId]; // } export interface RoutineType { routineId: number; title: string; emoji: string; color: string; startGoalTime: string; durationGoalTime: number; weeks: string[]; routineCategories: string[]; missions: MissionType[]; // routineCompletions: RoutineCompletionType[]; } export interface MissionType { missionId: number; emoji: string; title: string; color: string; durationGoalTime: number; } export interface RoutineCompletionType { routineCompletionId: number; routineInfo: RoutineInfoType; date: string; startTime: string; endTime: string; userDurationTime: number; missionCompletions: MissionCompletionType[]; } export interface RoutineInfoType { title: string; emoji: string; color: string; startGoalTime: string; durationGoalTime: number; routineCategories: string[]; } export interface MissionCompletionType { missionCompletionId: number; missionId: number; date: string; durationGoalTime: number; userDurationTime: number; } export interface RoutinePostType { routinePostId: number; title: string; userId: number; routineId: number; createdAt: string; updatedAt: string; comments: CommentType[]; likes: PostLikeType[]; } // 가안 // export interface RoutinePostType { // routinePostId: number; // title: string; // user: User; // 이름, 이미지 // routineInfo: RoutineInfoType; // createdAt: string; // updatedAt: string; // comments: CommentType[]; // likes: PostLikeType[]; // } export interface CommentType { commentId: number; text: string; userId: string; createdAt: string; updatedAt: string; likes: CommentLikeType[]; } // 가안 // export interface CommentType { // commentId: number; // text: string; // user: UserType; // 이름, 이미지 // createdAt: string; // updatedAt: string; // likes: CommentLikeType[]; // } export interface PostLikeType { postLikeId: number; postId: number; userId: number; } export interface CommentLikeType { commentLikeId: number; commentId: number; userId: number; }