Closed maxachis closed 4 months ago
@josh-chamberlain I may need a better understanding of the Search Tokens:
/data-sources
, and /quick-search
. Why do we have multiple endpoints performing the same functionality, only one uses search tokens?@maxachis consider this a conversation in progress. search tokens were a quick way to get a prototype up, but definitely not the longest-term solution. I think the reason these concepts are tied together is that search is the first real action people can take in the app.
Here are some goals of auth:
@joshuagraber , anything to add about what would be helpful from your perspective?
@josh-chamberlain @maxachis Sorry, I must've been away when you tagged me here. Closing this without any more work seems appropriate, and we can just move forward with the new search paradigm we've been discussing.
The
get
method in theSearchTokens
class inSearchTokens.py
has a number of issues which merit addressing:try-except
blocks, which makes the code complex and harder to maintainif type(self.psycopg2_connection) == dict:
is unclear and seems incorrect for validating database connection statusprint()
for logging is not advisable -- this is less flexible and harder to manage than logging frameworks which support levels and better output managementRefactoring is merited in this situation to make the code more comprehensible, maintainable, and testable.