Skip to content

Commit

Permalink
removed unused imports and variables
Browse files Browse the repository at this point in the history
  • Loading branch information
halil-kalyoncu committed Oct 13, 2023
1 parent e860b54 commit c36c9bd
Show file tree
Hide file tree
Showing 40 changed files with 24 additions and 99 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
HttpException,
HttpStatus,
ParseIntPipe,
Patch,
Get,
Query,
UseGuards,
Expand All @@ -12,7 +11,6 @@ import { ApiBearerAuth, ApiTags } from '@nestjs/swagger';
import { PrismaService } from 'src/prisma/prisma.service';
import { AchievementService } from '../service/achievement.service';
import { UserAchievements } from '@prisma/client';
import { Achievement } from '@prisma/client';
import { JwtAuthGuard } from '../../auth/guards/jwt.guard';

@ApiTags('Achievement module')
Expand Down
Empty file.
6 changes: 1 addition & 5 deletions nestjs/conf/src/achievement/service/achievement.service.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import { Injectable } from '@nestjs/common';
import { PrismaService } from '../../prisma/prisma.service';
import {
UserAchievements,
Achievement,
AchievementState,
} from '@prisma/client';
import { UserAchievements, AchievementState } from '@prisma/client';

@Injectable()
export class AchievementService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
Get,
HttpException,
HttpStatus,
InternalServerErrorException,
NotFoundException,
ParseIntPipe,
Query,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
ParseIntPipe,
HttpException,
HttpStatus,
ConsoleLogger,
NotFoundException,
BadRequestException,
UseGuards,
Expand All @@ -18,8 +17,6 @@ import { ApiTags, ApiBearerAuth } from '@nestjs/swagger';
import { ChannelInvitationsService } from '../../service/channel-invitations/channel-invitations.service';
import { UserService } from '../../../user/service/user-service/user.service';
import type { ChannelInvitationDto } from '../../dto/channelInvitation.dto';
import { User } from '@prisma/client';
import type { ErrorDto } from '../../dto/error.dto';
import { JwtAuthGuard } from '../../../auth/guards/jwt.guard';

@ApiTags('Channel-Invitations module')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
HttpStatus,
UseGuards,
} from '@nestjs/common';
import { ChannelMessage, ChannelMessageReadStatus } from '@prisma/client';
import { ChannelMessageReadStatus } from '@prisma/client';
import { ApiTags, ApiBearerAuth } from '@nestjs/swagger';
import { ChannelMessageReadStatusService } from '../../service/channel-message-read-status/channel-message-read-status.service';
import { JwtAuthGuard } from '../../../auth/guards/jwt.guard';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from '@nestjs/common';
import { ApiTags, ApiBearerAuth } from '@nestjs/swagger';
import { PrismaService } from '../../../prisma/prisma.service';
import { Channel, ChannelMember, ChannelMessage } from '@prisma/client';
import { Channel, ChannelMember } from '@prisma/client';
import { ChannelService } from '../../service/channel/channel.service';
import {
CreateChannelDto,
Expand All @@ -24,7 +24,6 @@ import {
ChannelMemberDto,
} from '../../dto/channel.dto';
import { ChannelMemberService } from '../../service/channel-member/channel-member.service';
import { ErrorDto } from 'src/chat/dto/error.dto';
import { JwtAuthGuard } from '../../../auth/guards/jwt.guard';

@ApiTags('Channel module')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import {
BadRequestException,
Body,
Controller,
Get,
HttpException,
HttpStatus,
NotFoundException,
ParseIntPipe,
Post,
Query,
Expand Down
1 change: 0 additions & 1 deletion nestjs/conf/src/chat/dto/channelInvitation.dto.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {
IsNotEmpty,
IsEnum,
IsOptional,
IsNumber,
IsString,
Expand Down
3 changes: 0 additions & 3 deletions nestjs/conf/src/chat/gateway/chat/chat.gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,9 @@ import {
ChannelMembershipDto,
} from '../../dto/channel.dto';
import {
ChannelVisibility,
ConnectedUser,
ChannelMember,
DirectMessage,
Friendship,
FriendshipStatus,
User,
Match,
Matchmaking,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ import {
Injectable,
NotFoundException,
} from '@nestjs/common';
import { BlockedUser, Prisma, User } from '@prisma/client';
import { BlockedUser, User } from '@prisma/client';
import { PrismaService } from '../../../prisma/prisma.service';
import { UserService } from '../../../user/service/user-service/user.service';
import { PrismaModel } from '../../../_gen/prisma-class/index';

@Injectable()
export class BlockedUserService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,7 @@ import { MessageService } from '../message/message.service';
import { CreateChannelMessageDto } from '../../dto/create-channel-message.dto';
import { ChannelMessageDto } from '../../dto/channel.dto';
import { PrismaService } from '../../../prisma/prisma.service';
import {
ChannelMessage,
Message,
User,
Channel,
ChannelMember,
ChannelMessageReadStatus,
BlockedUser,
} from '@prisma/client';
import { ChannelMessage, User } from '@prisma/client';
import { ChannelService } from '../channel/channel.service';
import { ChannelMemberService } from '../channel-member/channel-member.service';
import { BlockedUserService } from '../blocked-user/blocked-user.service';
Expand Down
3 changes: 0 additions & 3 deletions nestjs/conf/src/chat/service/channel/channel.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@ import {
forwardRef,
Inject,
NotFoundException,
BadRequestException,
} from '@nestjs/common';
import { PrismaService } from '../../../prisma/prisma.service';
import {
Channel,
ChannelMember,
ChannelVisibility,
Prisma,
User,
ChannelMemberRole,
ChannelMemberStatus,
Expand All @@ -20,7 +18,6 @@ import * as bcrypt from 'bcryptjs';
import {
SetPasswordDto,
DeletePasswordDto,
CreateChannelDto,
ChannelMembershipDto,
AdminActionDto,
ChannelInfoDto,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common';
import { MessageService } from '../message/message.service';
import { CreateDirectMessageDto } from '../../dto/create-direct-message.dto';
import { PrismaService } from '../../../prisma/prisma.service';
import { DirectMessage, Prisma } from '@prisma/client';
import { DirectMessage } from '@prisma/client';

@Injectable()
export class DirectMessageService {
Expand Down
4 changes: 0 additions & 4 deletions nestjs/conf/src/game/gateway/game/game.gateway.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import {
SubscribeMessage,
WebSocketGateway,
OnGatewayInit,
OnGatewayConnection,
OnGatewayDisconnect,
WebSocketServer,
ConnectedSocket,
MessageBody,
Expand All @@ -14,7 +11,6 @@ import { PowerUp } from '../../service/powerup.service';
import { MatchService } from '../../../match/service/match.service';
import { UserService } from '../../../user/service/user-service/user.service';
import { Match } from '@prisma/client';
import { createECDH } from 'crypto';
import { Paddle } from 'src/game/service/paddle.service';

@WebSocketGateway({
Expand Down
1 change: 0 additions & 1 deletion nestjs/conf/src/match/controller/match.controller.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {
Body,
Controller,
Delete,
Get,
HttpException,
HttpStatus,
Expand Down
3 changes: 1 addition & 2 deletions nestjs/conf/src/match/dto/match-outcomes.dto.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { ApiProperty } from '@nestjs/swagger';
import { MatchType } from '@prisma/client';
import { IsEnum, IsNotEmpty, IsNumber } from 'class-validator';
import { IsNotEmpty, IsNumber } from 'class-validator';

export class matchOutcomesDto {
@ApiProperty()
Expand Down
1 change: 0 additions & 1 deletion vue/conf/src/components/TwoFAAuth.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { useRouter } from 'vue-router'
import { useUserStore } from '../stores/userInfo'
import { useNotificationStore } from '../stores/notification'
const username = ref('')
const router = useRouter()
const userStore = useUserStore()
const userId = computed(() => userStore.userId)
Expand Down
1 change: 0 additions & 1 deletion vue/conf/src/components/activity/FriendRequests.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import { useNotificationStore } from '../../stores/notification'
import { useFriendRequestStore } from '../../stores/friendRequests'
import type { FriendshipI } from '../../model/friendship/friendship.interface'
import type { ErrorI } from '../../model/error.interface'
import type { UserI } from '../../model/user.interface'
const friendRequestStore = useFriendRequestStore()
const friendRequests = computed(() => friendRequestStore.friendRequests)
Expand Down
4 changes: 0 additions & 4 deletions vue/conf/src/components/activity/RequestItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,14 @@
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { useRouter } from 'vue-router'
import { library } from '@fortawesome/fontawesome-svg-core'
import { fas } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
import { useNotificationStore } from '../../stores/notification'
import type { FriendshipI } from '../../model/friendship/friendship.interface'
import type { ErrorI } from '../../model/error.interface'
library.add(fas)
const router = useRouter()
const notificationStore = useNotificationStore()
const emit = defineEmits(['reject-request', 'accept-request', 'block-user', 'unblock-user'])
Expand Down
4 changes: 1 addition & 3 deletions vue/conf/src/components/channels/ChannelManagerUserItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

<script setup lang="ts">
import { useRouter } from 'vue-router'
import { computed, ref, watch, watchEffect, onMounted, onUnmounted } from 'vue'
import { ref, watchEffect, onMounted } from 'vue'
import { library } from '@fortawesome/fontawesome-svg-core'
import { fas } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
Expand All @@ -64,11 +64,9 @@ import type { ErrorI } from '../../model/error.interface'
library.add(fas)
const router = useRouter()
const userStore = useUserStore()
const usernameUserStore = computed(() => userStore.username)
const notificationStore = useNotificationStore()
const socket = ref<Socket | null>(null)
const minutesMuted = ref(0)
const maxValue = ref(100)
//get the props from parent
const props = defineProps({
Expand Down
8 changes: 3 additions & 5 deletions vue/conf/src/components/channels/Channels.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,17 @@
<script setup lang="ts">
import ChannelManager from './ChannelManager.vue'
import ChannelMessages from '../chat/ChannelMessages.vue'
import { library } from '@fortawesome/fontawesome-svg-core'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
import { onBeforeUnmount, onMounted, computed, watch, ref } from 'vue'
import { onMounted, computed, ref } from 'vue'
import { useUserStore } from '../../stores/userInfo'
import { connectChatSocket, disconnectChatSocket } from '../../websocket'
import { connectChatSocket } from '../../websocket'
import { ChannelVisibility } from '../../model/channels/createChannel.interface'
import { useNotificationStore } from '../../stores/notification'
import JoinedChannels from './JoinedChannelsList.vue'
import AvailableChannels from './AvailableChannelsList.vue'
import type {
CreateChannelDto,
ChannelVisibilityType,
ChannelMemberI
ChannelVisibilityType
} from '../../model/channels/createChannel.interface'
import { Socket } from 'socket.io-client'
import Modal from '../utils/Modal.vue'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</template>

<script setup lang="ts">
import { ref, watch, computed, onMounted, onBeforeUnmount } from 'vue'
import { ref, watch, computed, onMounted } from 'vue'
import { useRouter } from 'vue-router'
import type { ChannelInviteeUserI } from '../../model/user.interface'
import ScrollViewer from '../utils/ScrollViewer.vue'
Expand Down
1 change: 0 additions & 1 deletion vue/conf/src/components/channels/JoinedChannelsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ const userId = computed(() => userStore.userId)
const socket = ref<Socket | null>(null)
type UnreadMessageCounts = Record<number, number>
const unreadMessageCounts = ref<UnreadMessageCounts>({})
const bannedUsers = ref<Record<number, boolean>>({})
const notificationStore = useNotificationStore()
const channelData = ref<ChannelEntryI[]>([])
Expand Down
5 changes: 1 addition & 4 deletions vue/conf/src/components/chat/ChannelMessages.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,9 @@
</template>
<script setup lang="ts">
import { ref, watch, computed, onMounted, onBeforeUnmount } from 'vue'
import { ref, computed, onMounted, onBeforeUnmount } from 'vue'
import { connectChatSocket } from '../../websocket'
import type { ChannelEntryI } from '../../model/channels/createChannel.interface'
import type { UserI } from '../../model/user.interface'
import type { ChannelMessageI } from '../../model/channels/channelMessage.interface'
import jwtDecode from 'jwt-decode'
import Message from './Message.vue'
import ScrollViewer from '../utils/ScrollViewer.vue'
import { useUserStore } from '../../stores/userInfo'
Expand Down
2 changes: 1 addition & 1 deletion vue/conf/src/components/chat/FriendMessages.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, watch, computed, onMounted, onBeforeUnmount } from 'vue'
import { ref, computed, onMounted } from 'vue'
import { connectChatSocket } from '../../websocket'
import type { FriendshipEntryI } from '../../model/friendship/friendshipEntry.interface'
import type { UserI } from '../../model/user.interface'
Expand Down
4 changes: 0 additions & 4 deletions vue/conf/src/components/chat/Message.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<script setup lang="ts">
import type { directMessageI } from '../../model/message/directMessage.interface'
import type { UserI } from '../../model/user.interface'
import type { MessageI } from '../../model/message/message.interface'
const props = defineProps({
sender: {
type: String,
Expand Down
1 change: 0 additions & 1 deletion vue/conf/src/components/friends/Friends.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import ScrollViewer from '../utils/ScrollViewer.vue'
import FriendsModal from './FriendsModal.vue'
import FriendMessages from '../chat/FriendMessages.vue'
import FriendManager from './FriendManager.vue'
import { library } from '@fortawesome/fontawesome-svg-core'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
import { useUserStore } from '../../stores/userInfo'
import { Socket } from 'socket.io-client'
Expand Down
4 changes: 0 additions & 4 deletions vue/conf/src/components/game/GameField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,13 @@ const matchId = route.params.matchId as string
const router = useRouter()
const gameField = ref<HTMLElement | null>(null)
const hitCount = ref<number>(0)
let isMovingUp = ref<boolean>(false)
let isMovingDown = ref<boolean>(false)
const isPaused = ref<boolean>(false)
const fieldWidth = ref<number | null>(null)
const fieldHeight = ref<number | null>(null)
const socket = ref<Socket | null>(null)
const serverIp = ref<string | null>(null)
const side = ref<string | null>(null)
const ballCoordinates = ref<{ x: number; y: number } | null>(null)
const PowerUps = ref<any[]>([])
Expand All @@ -104,8 +102,6 @@ let playerAScore = ref<number>(0)
let playerBScore = ref<number>(0)
let goalsToBeat = ref<number>(0)
let keyState: { [key: string]: boolean } = { ArrowUp: false, ArrowDown: false }
const chatSocket = ref<Socket | null>(null)
const countdown = ref<number>(-1)
Expand Down
Empty file.
6 changes: 1 addition & 5 deletions vue/conf/src/components/layout/GameLayout.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<script setup lang="ts">
import { RouterLink, RouterView } from 'vue-router'
import { computed } from 'vue'
import { useRoute } from 'vue-router'
const route = useRoute()
import { RouterView } from 'vue-router'
</script>

<template>
Expand Down
6 changes: 1 addition & 5 deletions vue/conf/src/components/layout/MainLayout.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
<script setup lang="ts">
import { RouterLink, RouterView } from 'vue-router'
import { computed } from 'vue'
import { useRoute } from 'vue-router'
import { RouterView } from 'vue-router'
import SideBar from './SideBar.vue'
import TopNavBar from './TopNavBar.vue'
const route = useRoute()
</script>

<template>
Expand Down
2 changes: 1 addition & 1 deletion vue/conf/src/components/layout/SideBar.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import Channels from '../channels/Channels.vue'
import Friends from '../friends/Friends.vue'
import { ref, onMounted } from 'vue'
import { ref } from 'vue'
let showFriendsSideBar = ref(true)
Expand Down
Loading

0 comments on commit c36c9bd

Please sign in to comment.