pastorsj / blog-api

A simple api for storing users and blogs
https://pastorsj.github.io/blog-api/
MIT License
3 stars 2 forks source link

Added ability to update images, instead of just posting images and no… #66

Closed pastorsj closed 6 years ago

pastorsj commented 6 years ago

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

The API was allowing the user to post profile pictures, but instead of updating them, they were just overwriting what was there. This was an issue when the mime type was different from the previous picture

What is the new behavior?

The system will delete the profile picture of the user before adding a new one. This applies also to cover photos for articles

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.3%) to 85.434% when pulling 20098fb837ad46db214953e58bc1de2cb3e4eef4 on feature/update-images into 96135fa91ff67949c2054decd5e763dbc13ac86a on master.

pastorsj commented 6 years ago

Approved

Approved with PullApprove