Skip to content

Commit

Permalink
removed redundant checks
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinyanakiev authored and ccanos committed Nov 18, 2024
1 parent 747d6ed commit aaa12c8
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/services/api/lookup/lookup.resolver.fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -717,16 +717,9 @@ export class LookupResolverFields {
description: 'Lookup the specified License',
})
async license(
@CurrentUser() agentInfo: AgentInfo,
@Args('ID', { type: () => UUID }) id: string
): Promise<ILicense> {
const license = await this.licenseService.getLicenseOrFail(id);
this.authorizationService.grantAccessOrFail(
agentInfo,
license.authorization,
AuthorizationPrivilege.READ,
`lookup license: ${license.id}`
);

return license;
}
Expand Down

0 comments on commit aaa12c8

Please sign in to comment.