-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
featureNew feature or requestNew feature or request
Description
사용자 걸음수 API
steps.controller.ts / steps.routes.ts / steps.types.ts
이 기능은 사용자의 걸음수를 날짜별로 조회하고 추가(업데이트)할 수 있는 API를 제공합니다.
엔드포인트
1. 사용자 걸음수 조회
- URL:
/api/steps/{userId} - Method:
GET - Query Parameter:
date(string, required): 조회할 날짜 (YYYY-MM-DD 형식)
- Response:
- 200 OK
{ "userId": 1, "steps": 5000, "message": "걸음수 조회 성공" } - 400 Bad Request: 유효하지 않은 userId 또는 date 값일 때
- 404 Not Found: 해당 날짜에 걸음수 데이터가 없을 경우
- 500 Internal Server Error: 서버 에러 발생 시
- 200 OK
2. 사용자 걸음수 추가 (업데이트)
- URL:
/api/steps/{userId}/add - Method:
PUT - Request Body:
{ "steps": 500, "date": "2025-01-31" }
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureNew feature or requestNew feature or request