Skip to content

Commit

Permalink
Adding some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Misterblue committed Apr 19, 2021
1 parent 91d5664 commit 5c8d002
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Entities/EntityFilters/VisibilityFilter.ts
Expand Up @@ -22,6 +22,10 @@ import { AccountEntity } from '@Entities/AccountEntity';
import { Logger } from '@Tools/Logging';
import { DomainEntity } from '@Entities/DomainEntity';

// A filter to return entities the requestor can "see".
// This checks for 'friend', 'connection' and 'asAdmin' relationships
// and returns entities that are friends, etc of the requestor.
//
// NOTE NOTE NOTE NOTE NOTE
// This filter can't be used as a usual criteria filter because the test
// requires a DB $LOOKUP operation (to lookup the account of the Place's domain)
Expand Down
1 change: 1 addition & 0 deletions src/route-tools/Util.ts
Expand Up @@ -123,6 +123,7 @@ export async function buildLocationInfo(pAcct: AccountEntity): Promise<any> {
return ret;
};

// A smaller, top-level domain info block
export async function buildDomainInfo(pDomain: DomainEntity): Promise<any> {
return {
'id': pDomain.id,
Expand Down
1 change: 1 addition & 0 deletions src/routes/api/v1/places.ts
Expand Up @@ -41,6 +41,7 @@ const procGetPlaces: RequestHandler = async (req: Request, resp: Response, next:
// if (req.vAuthAccount) {
const pager = new PaginationInfo();
const placer = new PlaceFilterInfo();
// you can only see friends, connections, etc
const visibilitier = new VisibilityFilter(req.vAuthAccount);

pager.parametersFromRequest(req);
Expand Down

0 comments on commit 5c8d002

Please sign in to comment.