ProjectDrawdown / global-research-platform

Drawdown Global Research Platform - UI
Other
20 stars 19 forks source link

resource upload API #58

Closed sutjin closed 2 years ago

sutjin commented 2 years ago

Introduced a new API POST /resource/{entity} that would take in and "process" the excel file, and save the parsed data to the DB. Also updated some documentation work.

Open Qs: @denised would love to sycn with you sometime this week on the plan of converting the excel into a resource object

@litenull need to sycn to ensure we have the same input

@eethann this implementation assumed what is uploaded is going to be available for everyone. I was thinking about it and it's possible for us to add a user_id field on the resource object. null would mean it is shared to everyone, and if its set, then its meant for that user only.

If we are to have the ability share this resource, it depends on the UI Flow, but postgres would allow a JSON structure in the DB, and we can change user_id into arrays and do a simple any().

by default we assign Resource to said user ID, then if they want to share is where we do a meaningful namecheck to prevent collision.

sutjin commented 2 years ago

closing as I will reopen with different walkthrough