FOSS-Cell-GECPKD / DevPad

https://dev-pad.netlify.app/
MIT License
8 stars 8 forks source link

Add auto refresh/auto fetch #9

Open anasvakyathodi opened 4 years ago

anasvakyathodi commented 4 years ago

Posts data in the /posts path must refresh data after submitting a post in the newpost (/new) page. Till Now, user have to refresh the posts page after submitting post.

karmanya007 commented 4 years ago

There is no /new endpoint's implementation in postRoutes.js.

anasvakyathodi commented 4 years ago

There is no /new endpoint's implementation in postRoutes.js.

What I meant is... there is a path https://dev-pad.netlify.app/new where we can upload post

image

After submitting... there is a message showing successfully submitted...also post fetching function is inside context file, where you can change the data while the submission is success.

Present condition is: After submission, there is no fetching happened after submission... hence no new postes are shown

karmanya007 commented 4 years ago

Okay. Can I work on this then?

anasvakyathodi commented 4 years ago

Okay. Can I work on this then?

Sure... and if you have doubt of endpoint. This may help:

image

/ is used as post method in postRoutes.js

It's used in server.js is as

image

So endpoint will be

/posts/ with postmethod

And I don't think backend stuff doesn't need for this issue.