gdgpescara / hedwig

Other
20 stars 12 forks source link

BO21 - Create a DAL function to add a Sponsor #186

Open gregoriopalama opened 5 months ago

gregoriopalama commented 5 months ago

Add a DAL function in the Sponsorship API.

The function accept contain the informations about the sponsor:

The response will be an error if something goes wrong. Otherwise, the function will provide the inserted sponsor object in the response's body, including the ID of the document in the DB.

Depends on #182

giacomoRanieri commented 2 months ago

I'll try resolving this issue. I need just a small clarification.

I recon that the "Also" part may require a multipart form data to be able to also upload the image. Does this mean that:

gregoriopalama commented 2 months ago

Thanks for asking @giacomoRanieri . First of all, I've updated the issue's description to reflect the fact that this depends on #182 : we need the endpoint on the sponsorships levels, before we can work on this.

@camillobucciarelli I think we should discuss Giacomo's doubts asap and provide a proper answer

gregoriopalama commented 2 months ago

@giacomoRanieri again, thanks for your questions. We've discussed this internally and updated the issue accordingly: the image will be handled solely with the appropriate endpoint, keeping this one very simple. The PUT action on the image endpoint, making it idempotent, will reflect the meaning of it: the image will be "overwritten" everytime, by deleting the old one from the storage, uploading the new one and updating the image url in the firestore document

giacomoRanieri commented 2 months ago

I'll wait for #182 to be completed to work on this :)