Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Change /api/v1/users/connections response to have proper connection t…
…ype flag.

    The code seemed to want "is_friend" but it really wants just "friend".
Update documentation for /api/v1/users/connections
  • Loading branch information
Misterblue committed Nov 3, 2020
1 parent b3776e1 commit 24c9c95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/API-Users.md
Expand Up @@ -158,7 +158,7 @@ Set a user as a friend. The other use must already have a "connection" with this
"users": [
{
"username": string,
"connection": string, // either "is_friend" or "is_connection"
"connection": string, // either "friend" or "connection"
"images": {
"thumbnail": URLstring,
"hero": URLstring,
Expand Down
2 changes: 1 addition & 1 deletion src/routes/api/v1/users/connections.ts
Expand Up @@ -48,7 +48,7 @@ const procGetUsersConnections: RequestHandler = async (req: Request, resp: Respo
if (aAccount) {
connectionInfo.push( {
'username': connectionUsername,
'connection': SArray.has(req.vAuthAccount.friends, connectionUsername) ? 'is_friend' : 'is_connection',
'connection': SArray.has(req.vAuthAccount.friends, connectionUsername) ? 'friend' : 'connection',
'images': await buildImageInfo(aAccount),
'location': await buildLocationInfo(aAccount)
});
Expand Down

0 comments on commit 24c9c95

Please sign in to comment.