Skip to content

[web-35-1] 관리자 캘린더 일정 조회 API 구현#25

Merged
Chunwol merged 1 commit into
feature/web-35from
feature/web-35-1
May 23, 2026
Merged

[web-35-1] 관리자 캘린더 일정 조회 API 구현#25
Chunwol merged 1 commit into
feature/web-35from
feature/web-35-1

Conversation

@Chunwol
Copy link
Copy Markdown
Member

@Chunwol Chunwol commented May 23, 2026

작업 내용

관리자 페이지에서 캘린더 일정을 조회할 수 있는 API를 구현합니다. 년별 조회(월별 그룹)와 월별 조회를 별도 엔드포인트로 분리

변경 사항

  • GET /api/v1/admin/calendar 년별 조회 엔드포인트 구현
  • GET /api/v1/admin/calendar/month 월별 조회 엔드포인트 구현
  • CalendarMonthlyResponseDto 추가 (월별 그룹 응답)
  • CalendarScheduleRepositoryfindByDateRange() 추가
  • DB 레벨 정렬 적용 (시작일 오름차순)

API

캘린더 년별 조회 (월별 그룹)

GET /api/v1/admin/calendar?year=2026

Request: Query Parameter year (필수)

Response: 200 OK

{
  "success": true,
  "data": [
    {
      "yearMonth": "2026-05",
      "schedules": [
        {
          "calendarId": 1,
          "title": "MT",
          "startDate": "2026-05-01",
          "endDate": "2026-05-03"
        }
      ]
    },
    {
      "yearMonth": "2026-06",
      "schedules": [
        {
          "calendarId": 8,
          "title": "정기모임",
          "startDate": "2026-06-10",
          "endDate": "2026-06-10"
        }
      ]
    }
  ]
}

캘린더 월별 조회

GET /api/v1/admin/calendar/month?year=2026&month=7

Request: Query Parameter year (필수), month (필수)

Response: 200 OK

{
  "success": true,
  "data": [
    {
      "calendarId": 3,
      "title": "Hackathon",
      "startDate": "2026-07-05",
      "endDate": "2026-07-06"
    },
    {
      "calendarId": 2,
      "title": "Summer MT",
      "startDate": "2026-07-10",
      "endDate": "2026-07-12"
    }
  ]
}

테스트

  • GET /api/v1/admin/calendar?year=2026 → 200 OK (월별 그룹 응답)
  • GET /api/v1/admin/calendar/month?year=2026&month=7 → 200 OK (해당 월 일정만 반환)
  • year 미전달 시 400 에러
  • 일정이 없는 경우 빈 배열 반환

@Chunwol Chunwol requested a review from chldPDms May 23, 2026 03:21
@Chunwol Chunwol self-assigned this May 23, 2026
@Chunwol Chunwol added the enhancement New feature or request label May 23, 2026
@Chunwol Chunwol merged commit 0175299 into feature/web-35 May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant