Skip to content

Commit

Permalink
add num flyers for organizations
Browse files Browse the repository at this point in the history
  • Loading branch information
cindy-x-liang committed Nov 22, 2023
1 parent 74333d5 commit 8cbfc06
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/resolvers/OrganizationResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ class OrganizationResolver {
async clicks(@Root() organization: Organization): Promise<number> {
return OrganizationRepo.getClicks(organization);
}

@FieldResolver((_returns) => Number, {
description: "Returns the total times clicked of an <Organization's> <Flyers>",
})
async numFlyers(@Root() organization: Organization): Promise<number> {
return OrganizationRepo.getNumFlyers(organization);
}
}

export default OrganizationResolver;

0 comments on commit 8cbfc06

Please sign in to comment.