Open jpdillingham opened 5 years ago
Related to #45 and a prerequisite for #46
Would the desired behavior be to have a request made to the api on every button click? Similar to the advice api?
I'm imagining an /idea/
endpoint that would return an object with startup, noun and id properties. If a record for the startup/noun pairing exists in the database, return that id, otherwise generate one randomly. An extension of this would be /idea/id/
that would act as a permalink to that pairing.
In this scenario the id would be saved the first time someone 'reacts' or shares it to social media, otherwise it would be thrown away.
Move generation of startup/noun pairings back to a back-end and reconfigure the application to fetch pairings from it rather than generating them directly in the browser.
A datastore of some type will be necessary to store the lists of startups and nouns, and should be flexible to support additional functionality.