Still having the stupid ass nil dereferences, I think I might need to
migrate to using success returns instead of pointers. Because they're
fucked. And even more so now.
This basically marks the favorites page completed. Updating the recipe
repository to allow the search function to accept a userId and favorites
flag. This flag will toggle a "favorites only" search. Which can be used
to replicate the same functionality from the search page in the
favorites page. This later can serve as a baseline for updating to also
work for activity search.
I am starting to think an ORM is a good idea...I heard Gorm is good, but
for now, there is a bit too much tech debt.
The make button is pretty much done, just need to finish up by
rate limiting it. That will take place in the engagement repository.
Sharing works as well, just a UI change, there is no backend yet, maybe
there should be an engagement type for sharing recipes. But not totally
sure.
The viewing is also in a semi-working state. It does not create requests
for users that aren't signed in, which needs to come. With that update
there is a need to update HOW the requests come in, we don't need it
every time we load the page. Maybe just when we click to it, from
somewhere else?
Finally, the favoriting does not totally work. The entry into the
engagement table is complete, but the actual favorites table, favorite
creation, button toggling AND button rendering is not implemented yet.
However, this only occurs when the page is loaded WITH filters. If
filters are not found in the cookies, such as when a blank page is
loaded, then a search will only execute on submit.
The search is nearly complete for the initial implementation. Just need
to figure out what to do with the text search provided, make any
required UI changes, and eventual implement pagination via a "load more"
button.
This means that we can use the cookie data to load the filters when the
search page loads. The final step is making sure the search is complete
and the simple redirection. Which will come in the next commit!
Missing some context storage and better passing of data to allow
between the home page to the search page. Need a way to store the search
results in state so they can be retrieved when the page is reloaded,
etc.