From 901b2a68e0f681814e196e7f8332089341d23484 Mon Sep 17 00:00:00 2001 From: Yuri Becker Date: Fri, 12 Jan 2024 02:32:15 +0100 Subject: [PATCH] Fix linting errors in backend --- backend/src/auditlog/dto/audit-log-filter.dto.ts | 2 +- backend/src/auth/jwt/jwt-auth.controller.ts | 4 ---- backend/src/guild/moderation/user/user.controller.ts | 2 +- backend/src/util/guards/is-mod.guard.ts | 1 - 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/backend/src/auditlog/dto/audit-log-filter.dto.ts b/backend/src/auditlog/dto/audit-log-filter.dto.ts index dc0078f..afd7a88 100644 --- a/backend/src/auditlog/dto/audit-log-filter.dto.ts +++ b/backend/src/auditlog/dto/audit-log-filter.dto.ts @@ -1,4 +1,4 @@ -import { IsArray, IsIn, IsOptional, IsString } from 'class-validator'; +import { IsIn, IsOptional, IsString } from 'class-validator'; import { ApiPropertyOptional } from '@nestjs/swagger'; import { Action, diff --git a/backend/src/auth/jwt/jwt-auth.controller.ts b/backend/src/auth/jwt/jwt-auth.controller.ts index 85f864b..b7c6bb6 100644 --- a/backend/src/auth/jwt/jwt-auth.controller.ts +++ b/backend/src/auth/jwt/jwt-auth.controller.ts @@ -6,17 +6,13 @@ import { Post, Query, Req, - UnauthorizedException, UseGuards, } from '@nestjs/common'; import { JwtAuthService } from './jwt-auth.service'; import { RefreshJwtGuard } from './guards/refresh-auth.guard'; import { ApiBearerAuth, ApiHeader, ApiTags } from '@nestjs/swagger'; -import { catchError, firstValueFrom } from 'rxjs'; -import { AxiosError } from 'axios'; import { HttpService } from '@nestjs/axios'; import { ConfigService } from '@nestjs/config'; -import { OAuthErrorData } from 'discord.js'; @Controller('auth') @ApiTags('auth/jwt') diff --git a/backend/src/guild/moderation/user/user.controller.ts b/backend/src/guild/moderation/user/user.controller.ts index 4fffdf2..36580b1 100644 --- a/backend/src/guild/moderation/user/user.controller.ts +++ b/backend/src/guild/moderation/user/user.controller.ts @@ -9,7 +9,7 @@ import { UseGuards, } from '@nestjs/common'; import { ApiBearerAuth, ApiOperation, ApiResponse } from '@nestjs/swagger'; -import { ChannelType, Client, GuildMember, User } from 'discord.js'; +import { ChannelType, Client, User } from 'discord.js'; import { DiscordUser, userResponseSchema, diff --git a/backend/src/util/guards/is-mod.guard.ts b/backend/src/util/guards/is-mod.guard.ts index 7adc1b8..fd67262 100644 --- a/backend/src/util/guards/is-mod.guard.ts +++ b/backend/src/util/guards/is-mod.guard.ts @@ -5,7 +5,6 @@ import { Injectable, InternalServerErrorException, Logger, - UnauthorizedException, } from '@nestjs/common'; import { PrismaService } from '../../prisma.service'; import { Request } from 'express';