Skip to content

Commit 3f43eb0

Browse files
committed
update readme for 1.0
1 parent a1a9ec9 commit 3f43eb0

4 files changed

Lines changed: 1077 additions & 2629 deletions

File tree

README.md

Lines changed: 35 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,42 @@ Seedpress is a headless Node JS API server built with Express, for PostgreSQL us
2727
* [X] Authentication with JSON Web Token
2828
* [X] Email, Password validations
2929
* [X] User login and registration
30-
* [X] API and Unit testing
31-
* [X] Page, Post, Media and Tag models
30+
* [X] Full API and Unit test coverage
31+
* [X] Page and Term models with belongsToMany two way relationship
3232
* [X] Easily deployable to Heroku (Procfile)
3333

34+
### Schema
35+
36+
* Post
37+
* id
38+
* postTitle
39+
* postSlug
40+
* postType
41+
* postDate
42+
* postContent
43+
* postAuthor
44+
* postImage
45+
* postMedia
46+
* postStatus
47+
* postExpiry
48+
* postFrequency
49+
* postTerms
50+
* createdAt
51+
* updatedAt
52+
53+
* Terms
54+
* id
55+
* termType
56+
* termName
57+
* createdAt
58+
* updatedAt
59+
60+
* PostTerms
61+
* termId
62+
* postId
63+
* createdAt
64+
* updatedAt
65+
3466
### To run locally
3567

3668
Make sure to install and run PostgreSQL first. There are a list of package.json
@@ -57,7 +89,7 @@ yarn test
5789
#### Postman
5890

5991
There is a postman collection file for API testing and development in
60-
`test/newseed-api.postman_collection.json`. It contains scripts and
92+
`test/seedpress-api.postman_collection.json`. It contains scripts and
6193
basic CRUD for:
6294

6395
* /auth
@@ -71,20 +103,6 @@ basic CRUD for:
71103
* [GET] All posts (/)
72104
* [GET] Single post (/:slug)
73105

74-
* /pages
75-
* [POST] Single page (/ - with auth)
76-
* [PATCH] Single page (/:slug - with auth)
77-
* [DEL] Single page (/:slug - with auth)
78-
* [GET] All pages (/)
79-
* [GET] Single page (/:slug)
80-
81-
* /media
82-
* [POST] Single medium (/ - with auth)
83-
* [PATCH] Single medium (/:slug - with auth)
84-
* [DEL] Single medium (/:slug - with auth)
85-
* [GET] All media (/)
86-
* [GET] Single medium (/:slug)
87-
88106
### To deploy on Heroku
89107
```
90108
heroku login

server/api/post/controller.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@ function updatePost(req, res) {
133133
if (!post.dataValues.postSlug.includes(newTitle)) {
134134
req.body.postSlug = `${newTitle}-${Date.now()}`;
135135
}
136-
return post.uppostDateAttributes(req.body);
136+
return post.updateAttributes(req.body);
137137
})
138-
.then((uppostDatedPost) => {
139-
res.json(uppostDatedPost);
138+
.then((updatedPost) => {
139+
res.json(updatedPost);
140140
})
141141
.catch((err) => res.status(400).send({
142142
error: err.message

0 commit comments

Comments
 (0)