From 2e84e0ff409f923e9b41c721a19b0832c46c5d22 Mon Sep 17 00:00:00 2001 From: Daniel Krol Date: Sat, 9 Apr 2022 19:18:27 -0400 Subject: [PATCH] Remove parameter we don't care about. --- src/app/approve/approve.component.ts | 2 +- src/app/backend-api.service.ts | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/app/approve/approve.component.ts b/src/app/approve/approve.component.ts index 3d2102c..7194fdf 100644 --- a/src/app/approve/approve.component.ts +++ b/src/app/approve/approve.component.ts @@ -274,7 +274,7 @@ export class ApproveComponent implements OnInit { return of(description); } // Otherwise, we hit get-users-stateless to fetch profiles. - return this.backendApi.GetUsersStateless(publicKeys, true).pipe((map(res => { + return this.backendApi.GetUsersStateless(publicKeys).pipe((map(res => { const userList = res.UserList; // If the response has no users, return the description as is. if (userList.length === 0) { diff --git a/src/app/backend-api.service.ts b/src/app/backend-api.service.ts index b6b5089..e4809bb 100644 --- a/src/app/backend-api.service.ts +++ b/src/app/backend-api.service.ts @@ -46,18 +46,13 @@ export class BackendAPIService { return this.post(path, {...body, ...{JWT: jwt}}); } - // When SkipForLeaderboard is true, this endpoint only returns ProfileEntryResponse, IsGraylisted, IsBlacklisted, - // IsAdmin, and IsSuperAdmin for each user. - // When SkipForLeaderboard is false, we also fetch the user's balance, profiles this user follows, hodlings, and - // UserMetadata. Oftentimes, this information is not needed and excluding it significantly improves performance. GetUsersStateless( - publicKeys: string[], SkipForLeaderboard: boolean = false, + publicKeys: string[] ): Observable<{ UserList: User[]}> { return this.httpClient.post( `${this.endpoint}/get-users-stateless`, { PublicKeysBase58Check: publicKeys, - SkipForLeaderboard, }, ); } @@ -66,7 +61,7 @@ export class BackendAPIService { publicKeys: string[] ): Observable<{[key: string]: string}> { const usernames: {[key: string]: any} = {}; - const req = this.GetUsersStateless(publicKeys, true); + const req = this.GetUsersStateless(publicKeys); if (publicKeys.length > 0) { return req.pipe( map( res => {