gdgpescara / hedwig

Other
20 stars 12 forks source link

BO28 - Create an endpoint to update a sponsor's logo image #188

Open gregoriopalama opened 2 months ago

gregoriopalama commented 2 months ago

Add an endpoint in the Sponsorship API, mapped to PUT /partnership/{partnershipID}/partner/{partnerID}/image The endpoint should be allowed to Devfest Organizers only.

The image should be added as attachment to the request. The image will be uploaded in Firebase Storage and the public link will be used to update sponsor's document in Firestore. If a logo image is already set, it should be deleted from Firebase Storage.

The response will have a 200 HTTP Status code if the update goes smooth, also providing the updated sponsor object in the response's body, including the id of the document in the DB.