mirror of
https://github.com/wahyd4/libr-2.git
synced 2026-08-09 05:15:53 +10:00
#1 fix syntax error
This commit is contained in:
@@ -119,6 +119,7 @@
|
||||
7 喜欢 post POST: http://localhost:3000/api/v1/posts/3/like
|
||||
|
||||
- 返回结果
|
||||
|
||||
``` json
|
||||
{
|
||||
"msg": "done",
|
||||
@@ -133,48 +134,51 @@
|
||||
- 参数
|
||||
* content
|
||||
- 返回结果
|
||||
``` json
|
||||
{
|
||||
"msg": "done",
|
||||
"comments_count": 3
|
||||
}
|
||||
```
|
||||
|
||||
``` json
|
||||
{
|
||||
"msg": "done",
|
||||
"comments_count": 3
|
||||
}
|
||||
```
|
||||
|
||||
10 评论列表 GET http://localhost:3000/api/v1/posts/1/comments
|
||||
|
||||
- 返回结果:
|
||||
``` json
|
||||
[
|
||||
{
|
||||
"content": "这篇文章写得很深入,很好",
|
||||
"likes_count": 0,
|
||||
"user": "test",
|
||||
"time": "2015-08-12T22:00:27.556+08:00"
|
||||
},
|
||||
{
|
||||
"content": "太长了,不太好读",
|
||||
"likes_count": 1,
|
||||
"user": "test",
|
||||
"time": "2015-08-12T22:00:42.356+08:00"
|
||||
},
|
||||
{
|
||||
"content": "太长了,不太好读",
|
||||
"likes_count": 0,
|
||||
"user": "test",
|
||||
"time": "2015-08-16T22:48:39.099+08:00"
|
||||
}
|
||||
]
|
||||
```
|
||||
- 返回结果:
|
||||
|
||||
``` json
|
||||
[
|
||||
{
|
||||
"content": "这篇文章写得很深入,很好",
|
||||
"likes_count": 0,
|
||||
"user": "test",
|
||||
"time": "2015-08-12T22:00:27.556+08:00"
|
||||
},
|
||||
{
|
||||
"content": "太长了,不太好读",
|
||||
"likes_count": 1,
|
||||
"user": "test",
|
||||
"time": "2015-08-12T22:00:42.356+08:00"
|
||||
},
|
||||
{
|
||||
"content": "太长了,不太好读",
|
||||
"likes_count": 0,
|
||||
"user": "test",
|
||||
"time": "2015-08-16T22:48:39.099+08:00"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
11 喜欢评论 comment: POST http://localhost:3000/api/v1/posts/1/comments/1/like
|
||||
|
||||
- 返回结果:
|
||||
```json
|
||||
{
|
||||
"msg": "done",
|
||||
"likes_count": 1
|
||||
}
|
||||
```
|
||||
- 返回结果:
|
||||
|
||||
```json
|
||||
{
|
||||
"msg": "done",
|
||||
"likes_count": 1
|
||||
}
|
||||
```
|
||||
|
||||
12 取消喜欢评论 comment: POST http://localhost:3000/api/v1/posts/1/comments/1/unlike
|
||||
|
||||
|
||||
Reference in New Issue
Block a user