Open digisomni opened 3 years ago
The request /api/v1/account/:accountId accepts either the accountId or the account username for the ":accountId". See 'src/route-tools/middleware.ts::accountFromParams()' which looks up by username and, if not found, looks up by accountId. Also note that the username is URI encoded so special characters and such are processed correctly. I updated the documentation to include that clarification.
This PR includes the commits from PR#68 which is confusing.
Heh, yeah, once 68 gets merged then this will clear up. :)
Is this PR still necessary?
This PR is based off of PR #68
One problem that I am probably going to need to solve in Iamus with this PR is to add an API call to retrieve a user by username instead of their account ID as it might often be the case that you know their username but not their accountID. The only way for me to retrieve data on a specific user is to pull the entire userbase list then run through each one looking for a match which might be a performance/programming issue depending on what was looking to pull up this data.
So it might be good to have the database perform this check since it's probably far more performant and also has less back and forth involved.