일정 생성 API (POST /schedules)
새로운 일정을 생성합니다.
Request Body:
{
"username": "유정명",
"title": "할일 제목",
"todo": "할일 내용",
"created_at": "2025-05-19",
"updated_at": "2025-05-19"
}Response Body:
{
"id": 1,
"username": "유정명",
"title": "할일 제목",
"todo": "할일 내용",
"created_at": "2025-05-19",
"updated_at": "2025-05-19"
}일정 목록 조회 API (GET /schedules)
전체 일정을 조회합니다.
Response Body:
[
{
"id": 1,
"username": "유정명",
"title": "할일 제목",
"todo": "할일 내용",
"created_at": "2025-05-19",
"updated_at": "2025-05-19"
},
{
"id": 2,
"username": "박지민",
"title": "다른 할일",
"todo": "다른 내용",
"created_at": "2025-05-20",
"updated_at": "2025-05-20"
}
]일정 상세 조회 API (GET /schedules/{id})
지정된 ID의 일정을 조회합니다.
Response Body:
{
"id": 1,
"username": "유정명",
"title": "할일 제목",
"todo": "할일 내용",
"created_at": "2025-05-19",
"updated_at": "2025-05-19"
}일정 수정 API (PUT /schedules/{id})
지정된 ID의 일정을 수정합니다.
Request Body:
{
"title": "수정된 제목",
"todo": "수정된 내용",
"updated_at": "2025-05-20"
}Response Body:
{
"id": 1,
"username": "유정명",
"title": "수정된 제목",
"todo": "수정된 내용",
"created_at": "2025-05-19",
"updated_at": "2025-05-20"
}일정 삭제 API (DELETE /schedules/{id})
지정된 ID의 일정을 삭제합니다.
Response Body:
{
"message": "삭제가 완료되었습니다."
}유저 API (POST /users)
새로운 사용자를 등록합니다.
Request Body:
{
"username": "user123",
"email": "user@example.com",
"password": "password123"
}Response Body:
{
"id": 1,
"username": "user123",
"email": "user@example.com",
"created_at": "2025-05-26"
}유저 정보 조회 API (GET /users/{id})
사용자 ID로 회원 정보를 조회합니다.
Response Body:
{
"id": 1,
"username": "user123",
"email": "user@example.com",
"created_at": "2025-05-26"
}유저 수정 API (PUT /users/{id})
사용자 정보를 수정합니다.
Request Body:
{
"username": "newUser123",
"email": "newemail@example.com"
}Response Body:
{
"id": 1,
"username": "newUser123",
"email": "newemail@example.com",
"updated_at": "2025-05-26"
}로그인 API (POST /auth/login)
사용자 로그인 요청을 처리합니다.
Request Body:
{
"email": "user@example.com",
"password": "password123"
}Response Body:
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"user": {
"id": 1,
"username": "user123",
"email": "user@example.com"
}
}