-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
74 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
POST http://localhost:3003/api/users | ||
Content-Type: application/json | ||
|
||
{ | ||
"username": "ywt", | ||
"name": "ywt", | ||
"password": "123" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
GET http://localhost:1333/api/blogs | ||
GET http://localhost:3003/api/blogs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
GET http://localhost:3003/api/blogs/5f64fa477bb83426602f84f9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
POST http://localhost:1333/api/blogs | ||
POST http://localhost:3003/api/blogs | ||
Content-Type: application/json | ||
Authorization: bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiaWQiOiI1ZjU3NDU2ZWUzODRhYTdlYjI4ZDczZjAiLCJpYXQiOjE1OTk1NzIxOTl9.Z7Hq9tBt10ALXTwkWUYr1DhXQhPKhSc2O6899Yx1ur8 | ||
|
||
{ | ||
"title": "How to create your first app using React part 2", | ||
"author": "James Fisher", | ||
"url": "www.google.com", | ||
"likes": 4 | ||
"title": "test title1218", | ||
"author": "James Fisher1218", | ||
"url": "www.tommy.com", | ||
"likes": 5, | ||
"comments":[] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
PUT http://localhost:3003/api/blogs/5f64fa477bb83426602f84f9/comments | ||
Content-Type: application/json | ||
Authorization: bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiaWQiOiI1ZjU3NDU2ZWUzODRhYTdlYjI4ZDczZjAiLCJpYXQiOjE1OTk1NzIxOTl9.Z7Hq9tBt10ALXTwkWUYr1DhXQhPKhSc2O6899Yx1ur8 | ||
|
||
{ | ||
"blog": { | ||
"title": "编程珠玑", | ||
"author": "Jon Bentley", | ||
"url": "https://book.douban.com/subject/3227098/", | ||
"likes": 10, | ||
"comments": [] | ||
}, | ||
"comment": "very good" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
PUT http://localhost:3003/api/blogs/5f64fa477bb83426602f84f9 | ||
Content-Type: application/json | ||
Authorization: bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiaWQiOiI1ZjU3NDU2ZWUzODRhYTdlYjI4ZDczZjAiLCJpYXQiOjE1OTk1NzIxOTl9.Z7Hq9tBt10ALXTwkWUYr1DhXQhPKhSc2O6899Yx1ur8 | ||
|
||
{ | ||
"title": "编程珠玑", | ||
"author": "Jon Bentley", | ||
"url": "https://book.douban.com/subject/3227098/", | ||
"likes": 10, | ||
"comments": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,6 +118,8 @@ describe('删除和更新', () => { | |
}); | ||
|
||
|
||
|
||
|
||
afterAll(done => { | ||
mongoose.connection.close(); | ||
done(); | ||
|