From 8d6727fae643a7815fb5898e10d9c8d31ebddd34 Mon Sep 17 00:00:00 2001 From: junv Date: Sun, 16 Aug 2015 22:57:00 +0800 Subject: [PATCH] #1 fix syntax error --- README.md | 76 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 40 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 6c95b1f..66b108d 100644 --- a/README.md +++ b/README.md @@ -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