Skip to content

Commit fd3c185

Browse files
committed
Lint
1 parent e1b55ad commit fd3c185

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

src/api/review-application/reviewApplication.service.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ export class ReviewApplicationService {
7171
}
7272
// make sure application role matches
7373
if (
74-
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
7574
ReviewApplicationRoleOpportunityTypeMap[dto.role] !== opportunity.type
7675
) {
7776
throw new BadRequestException(

src/api/submission/submission.service.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1812,9 +1812,7 @@ export class SubmissionService {
18121812
: undefined;
18131813

18141814
if (requestedMemberId) {
1815-
const userId = authUser?.userId
1816-
? String(authUser.userId)
1817-
: undefined;
1815+
const userId = authUser?.userId ? String(authUser.userId) : undefined;
18181816
const isRequestingMember = userId === requestedMemberId;
18191817
const hasCopilotRole = (authUser?.roles ?? []).includes(
18201818
UserRole.Copilot,
@@ -1864,11 +1862,7 @@ export class SubmissionService {
18641862
: '';
18651863

18661864
let restrictedChallengeIds = new Set<string>();
1867-
if (
1868-
!isPrivilegedRequester &&
1869-
requesterUserId &&
1870-
!queryDto.challengeId
1871-
) {
1865+
if (!isPrivilegedRequester && requesterUserId && !queryDto.challengeId) {
18721866
try {
18731867
restrictedChallengeIds =
18741868
await this.getActiveSubmitterRestrictedChallengeIds(
@@ -1940,7 +1934,10 @@ export class SubmissionService {
19401934
submissions.length > 0 &&
19411935
(queryDto.challengeId
19421936
? true
1943-
: await this.canViewSubmitterIdentity(authUser, queryDto.challengeId));
1937+
: await this.canViewSubmitterIdentity(
1938+
authUser,
1939+
queryDto.challengeId,
1940+
));
19441941
if (shouldEnrichSubmitter) {
19451942
try {
19461943
const memberIds = Array.from(

src/shared/guards/tokenRoles.guard.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,9 @@ export class TokenRolesGuard implements CanActivate {
262262
): boolean {
263263
const generalUserRole = String(UserRole.User).trim().toLowerCase();
264264
const normalizedRequiredRoles = (requiredRoles || []).map((role) =>
265-
String(role ?? '').trim().toLowerCase(),
265+
String(role ?? '')
266+
.trim()
267+
.toLowerCase(),
266268
);
267269

268270
if (!normalizedRequiredRoles.includes(generalUserRole)) {

0 commit comments

Comments
 (0)