Files
plates-server/test-mood-checkins.http
richarjiang f26d8e64c6 feat: 新增心情打卡功能模块
实现心情打卡的完整功能,包括数据库表设计、API接口、业务逻辑和文档说明。支持记录多种心情类型、强度评分和统计分析功能。
2025-08-21 15:20:05 +08:00

94 lines
2.4 KiB
HTTP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

###
### 1. -
POST http://localhost:3000/mood-checkins
Authorization: Bearer YOUR_JWT_TOKEN
Content-Type: application/json
{
"moodType": "happy",
"intensity": 8,
"description": "",
"checkinDate": "2025-08-21",
"metadata": {
"tags": ["", ""],
"trigger": ""
}
}
### 2. -
POST http://localhost:3000/mood-checkins
Authorization: Bearer YOUR_JWT_TOKEN
Content-Type: application/json
{
"moodType": "anxious",
"intensity": 6,
"description": "",
"checkinDate": "2025-08-21",
"metadata": {
"tags": ["", ""],
"trigger": ""
}
}
### 3. -
POST http://localhost:3000/mood-checkins
Authorization: Bearer YOUR_JWT_TOKEN
Content-Type: application/json
{
"moodType": "excited",
"intensity": 9,
"description": "",
"checkinDate": "2025-08-21",
"metadata": {
"tags": ["", ""],
"trigger": ""
}
}
### 3.
GET http://localhost:3000/mood-checkins/daily
Authorization: Bearer YOUR_JWT_TOKEN
### 4.
GET http://localhost:3000/mood-checkins/daily?date=2025-08-21
Authorization: Bearer YOUR_JWT_TOKEN
### 5.
GET http://localhost:3000/mood-checkins/history?startDate=2025-08-01&endDate=2025-08-31
Authorization: Bearer YOUR_JWT_TOKEN
### 6.
GET http://localhost:3000/mood-checkins/history?startDate=2025-08-01&endDate=2025-08-31&moodType=happy
Authorization: Bearer YOUR_JWT_TOKEN
### 7.
GET http://localhost:3000/mood-checkins/statistics?startDate=2025-08-01&endDate=2025-08-31
Authorization: Bearer YOUR_JWT_TOKEN
### 8.
PUT http://localhost:3000/mood-checkins
Authorization: Bearer YOUR_JWT_TOKEN
Content-Type: application/json
{
"id": "MOOD_CHECKIN_ID",
"moodType": "thrilled",
"intensity": 9,
"description": " - ",
"metadata": {
"tags": ["", ""],
"trigger": ""
}
}
### 9.
DELETE http://localhost:3000/mood-checkins
Authorization: Bearer YOUR_JWT_TOKEN
Content-Type: application/json
{
"id": "MOOD_CHECKIN_ID"
}