codeuino / social-platform-donut-backend

Donut API:
http://donut-api-prod.codeuino.org/
GNU General Public License v3.0
24 stars 57 forks source link

Adds create post functionality. #89

Closed rak-shit closed 4 years ago

rak-shit commented 4 years ago

Added unit tests for create post API


name: Adds create post functionality. about: Adds the API to create Post.

Screenshots of the response from the server to the given message. Screenshot 2020-03-29 at 9 54 11 PM

Message

Screenshot 2020-03-29 at 9 54 24 PM

Response


Problem

Github Issue Number: #79 I am adding the ass post API so that the user on the donut platform can add a post.

Type of Change

[ ] New Feature

Checklist

[ ] My code follows the same style as the codebase [ ] I have updated the Readme accordingly [ ] I made PR against development branch [ ] I have run the test cases locally and it's passing. [ ] I have squashed my commits

codecov[bot] commented 4 years ago

Codecov Report

Merging #89 into development will decrease coverage by 4.90%. The diff coverage is 52.00%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development      #89      +/-   ##
===============================================
- Coverage        59.92%   55.01%   -4.91%     
===============================================
  Files               14       15       +1     
  Lines              252      309      +57     
  Branches            29       35       +6     
===============================================
+ Hits               151      170      +19     
- Misses              86      120      +34     
- Partials            15       19       +4     
Impacted Files Coverage Δ
app/models/Post.js 66.66% <ø> (ø)
app/routes/post.js 68.18% <46.15%> (-31.82%) :arrow_down:
app/controllers/post.js 21.56% <58.33%> (-3.44%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 98ce23e...570a140. Read the comment docs.

rak-shit commented 4 years ago

I have handled the image upload functionality. I have divided it into two parts where one will handle when the image is uploaded and the other one will handle when the image is not uploaded. I have also written the test cases.

Screenshot 2020-03-31 at 1 59 51 AM