- koa-simple-template
- koa-project-template
单个动态-评论-标签-头像详情
开发中
GET
/moment/details-2/{momentId}
请求参数
Path 参数
momentId
string
必需
示例值:
2
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'http://localhost:8000/moment/details-2/2'
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
必需
data
object
必需
id
integer
必需
content
string
必需
creatAt
string
必需
updateAt
string
必需
user
object
必需
comments
array [object {7}]
必需
labels
array [object {4}]
必需
示例
{
"code": 0,
"message": "获取动态详细成功!!!",
"data": {
"id": 2,
"content": "我以为吕布已经天下无敌了",
"creatAt": "2023-10-20T13:49:36.000Z",
"updateAt": "2023-10-20T14:53:10.000Z",
"user": {
"id": 6,
"name": "admin1",
"creatAt": "2023-10-19 17:10:44.000000",
"updateAt": "2023-10-23 18:40:52.000000",
"avatarURL": "http://localhost:8000/file/6/avatar"
},
"comments": [
{
"id": 1,
"user": {
"id": 5,
"name": "admin",
"avatarRUL": "http://localhost:8000/file/6/avatar"
},
"content": "当年你退出文坛,我是极力反对的!",
"creatAt": "2023-10-21 16:16:19.000000",
"momentId": 2,
"updataAt": "2023-10-21 16:16:19.000000",
"parentCommentId": null
},
{
"id": 3,
"user": {
"id": 5,
"name": "admin",
"avatarRUL": "http://localhost:8000/file/6/avatar"
},
"content": "先生好眼光!",
"creatAt": "2023-10-21 16:29:24.000000",
"momentId": 2,
"updataAt": "2023-10-21 16:29:24.000000",
"parentCommentId": 1
},
{
"id": 4,
"user": {
"id": 5,
"name": "admin",
"avatarRUL": "http://localhost:8000/file/6/avatar"
},
"content": "惭愧惭愧,当然海选没选你~~",
"creatAt": "2023-10-21 16:32:05.000000",
"momentId": 2,
"updataAt": "2023-10-21 16:32:05.000000",
"parentCommentId": 1
}
],
"labels": [
{
"id": 2,
"name": "鸡汤",
"creatAt": "2023-10-23 10:35:38.000000",
"updataAt": "2023-10-23 10:35:38.000000"
},
{
"id": 3,
"name": "情感",
"creatAt": "2023-10-23 11:51:43.000000",
"updataAt": "2023-10-23 11:51:43.000000"
},
{
"id": 6,
"name": "感悟",
"creatAt": "2023-10-23 13:20:02.000000",
"updataAt": "2023-10-23 13:20:02.000000"
}
]
}
}