From b1f602630281731831f8b327e87d0c20d0eae62f Mon Sep 17 00:00:00 2001 From: matteom0165 Date: Mon, 6 May 2024 22:36:52 +0200 Subject: [PATCH 1/2] refactor(folder-structure): move model dependent modules into models folder --- .../{ => models}/birthday/controller/birthday-entry.controller.ts | 0 .../birthday/dto/create-or-update-birthday-entry.dto.ts | 0 src/modules/{ => models}/birthday/module/birthday-entry.module.ts | 0 .../{ => models}/birthday/service/birthday-entry.service.ts | 0 src/modules/{ => models}/poll/dto/update-poll.dto.ts | 0 src/modules/{ => models}/poll/module/poll.module.ts | 0 src/modules/{ => models}/poll/service/db-poll.service.spec.ts | 0 src/modules/{ => models}/poll/service/db-poll.service.ts | 0 src/modules/{ => models}/poll/service/poll.service.ts | 0 .../someone-once-said/module/someone-once-said.module.ts | 0 .../someone-once-said/service/someone-once-said.service.spec.ts | 0 .../someone-once-said/service/someone-once-said.service.ts | 0 src/modules/{ => models}/version/controller/version.controller.ts | 0 src/modules/{ => models}/version/module/version.module.ts | 0 src/modules/{ => models}/version/service/version.service.ts | 0 15 files changed, 0 insertions(+), 0 deletions(-) rename src/modules/{ => models}/birthday/controller/birthday-entry.controller.ts (100%) rename src/modules/{ => models}/birthday/dto/create-or-update-birthday-entry.dto.ts (100%) rename src/modules/{ => models}/birthday/module/birthday-entry.module.ts (100%) rename src/modules/{ => models}/birthday/service/birthday-entry.service.ts (100%) rename src/modules/{ => models}/poll/dto/update-poll.dto.ts (100%) rename src/modules/{ => models}/poll/module/poll.module.ts (100%) rename src/modules/{ => models}/poll/service/db-poll.service.spec.ts (100%) rename src/modules/{ => models}/poll/service/db-poll.service.ts (100%) rename src/modules/{ => models}/poll/service/poll.service.ts (100%) rename src/modules/{ => models}/someone-once-said/module/someone-once-said.module.ts (100%) rename src/modules/{ => models}/someone-once-said/service/someone-once-said.service.spec.ts (100%) rename src/modules/{ => models}/someone-once-said/service/someone-once-said.service.ts (100%) rename src/modules/{ => models}/version/controller/version.controller.ts (100%) rename src/modules/{ => models}/version/module/version.module.ts (100%) rename src/modules/{ => models}/version/service/version.service.ts (100%) diff --git a/src/modules/birthday/controller/birthday-entry.controller.ts b/src/modules/models/birthday/controller/birthday-entry.controller.ts similarity index 100% rename from src/modules/birthday/controller/birthday-entry.controller.ts rename to src/modules/models/birthday/controller/birthday-entry.controller.ts diff --git a/src/modules/birthday/dto/create-or-update-birthday-entry.dto.ts b/src/modules/models/birthday/dto/create-or-update-birthday-entry.dto.ts similarity index 100% rename from src/modules/birthday/dto/create-or-update-birthday-entry.dto.ts rename to src/modules/models/birthday/dto/create-or-update-birthday-entry.dto.ts diff --git a/src/modules/birthday/module/birthday-entry.module.ts b/src/modules/models/birthday/module/birthday-entry.module.ts similarity index 100% rename from src/modules/birthday/module/birthday-entry.module.ts rename to src/modules/models/birthday/module/birthday-entry.module.ts diff --git a/src/modules/birthday/service/birthday-entry.service.ts b/src/modules/models/birthday/service/birthday-entry.service.ts similarity index 100% rename from src/modules/birthday/service/birthday-entry.service.ts rename to src/modules/models/birthday/service/birthday-entry.service.ts diff --git a/src/modules/poll/dto/update-poll.dto.ts b/src/modules/models/poll/dto/update-poll.dto.ts similarity index 100% rename from src/modules/poll/dto/update-poll.dto.ts rename to src/modules/models/poll/dto/update-poll.dto.ts diff --git a/src/modules/poll/module/poll.module.ts b/src/modules/models/poll/module/poll.module.ts similarity index 100% rename from src/modules/poll/module/poll.module.ts rename to src/modules/models/poll/module/poll.module.ts diff --git a/src/modules/poll/service/db-poll.service.spec.ts b/src/modules/models/poll/service/db-poll.service.spec.ts similarity index 100% rename from src/modules/poll/service/db-poll.service.spec.ts rename to src/modules/models/poll/service/db-poll.service.spec.ts diff --git a/src/modules/poll/service/db-poll.service.ts b/src/modules/models/poll/service/db-poll.service.ts similarity index 100% rename from src/modules/poll/service/db-poll.service.ts rename to src/modules/models/poll/service/db-poll.service.ts diff --git a/src/modules/poll/service/poll.service.ts b/src/modules/models/poll/service/poll.service.ts similarity index 100% rename from src/modules/poll/service/poll.service.ts rename to src/modules/models/poll/service/poll.service.ts diff --git a/src/modules/someone-once-said/module/someone-once-said.module.ts b/src/modules/models/someone-once-said/module/someone-once-said.module.ts similarity index 100% rename from src/modules/someone-once-said/module/someone-once-said.module.ts rename to src/modules/models/someone-once-said/module/someone-once-said.module.ts diff --git a/src/modules/someone-once-said/service/someone-once-said.service.spec.ts b/src/modules/models/someone-once-said/service/someone-once-said.service.spec.ts similarity index 100% rename from src/modules/someone-once-said/service/someone-once-said.service.spec.ts rename to src/modules/models/someone-once-said/service/someone-once-said.service.spec.ts diff --git a/src/modules/someone-once-said/service/someone-once-said.service.ts b/src/modules/models/someone-once-said/service/someone-once-said.service.ts similarity index 100% rename from src/modules/someone-once-said/service/someone-once-said.service.ts rename to src/modules/models/someone-once-said/service/someone-once-said.service.ts diff --git a/src/modules/version/controller/version.controller.ts b/src/modules/models/version/controller/version.controller.ts similarity index 100% rename from src/modules/version/controller/version.controller.ts rename to src/modules/models/version/controller/version.controller.ts diff --git a/src/modules/version/module/version.module.ts b/src/modules/models/version/module/version.module.ts similarity index 100% rename from src/modules/version/module/version.module.ts rename to src/modules/models/version/module/version.module.ts diff --git a/src/modules/version/service/version.service.ts b/src/modules/models/version/service/version.service.ts similarity index 100% rename from src/modules/version/service/version.service.ts rename to src/modules/models/version/service/version.service.ts From 0a0e4c57de06c93527b709e3a1b60a8a24ec8177 Mon Sep 17 00:00:00 2001 From: Matteo Juen Date: Tue, 7 May 2024 11:34:36 +0200 Subject: [PATCH 2/2] refactor: import paths --- src/modules/command/command.module.ts | 8 ++++---- .../command/commands/activate-birthday-shoutout.ts | 4 ++-- src/modules/command/commands/add-birthday-entry.ts | 4 ++-- .../command/commands/deactivate-birthday-shoutout.ts | 4 ++-- src/modules/command/commands/get-a-quote.ts | 2 +- src/modules/command/commands/poll.ts | 2 +- src/modules/command/commands/someone-once-said.ts | 2 +- src/modules/command/commands/version.ts | 2 +- src/modules/cron-tasks/cron-scheduler.ts | 2 +- src/modules/cron-tasks/task.module.ts | 2 +- .../cron-tasks/tasks/birthday-shoutout.task.ts | 2 +- src/modules/discord/discord.module.ts | 2 +- src/modules/discord/discord.service.ts | 2 +- src/modules/event/event.module.ts | 2 +- src/modules/event/services/interaction.spec.ts | 2 +- src/modules/event/services/interaction.ts | 11 ++--------- .../birthday/controller/birthday-entry.controller.ts | 4 ++-- .../models/birthday/module/birthday-entry.module.ts | 2 +- .../models/birthday/service/birthday-entry.service.ts | 2 +- src/modules/models/poll/module/poll.module.ts | 2 +- .../models/poll/service/db-poll.service.spec.ts | 4 ++-- src/modules/models/poll/service/db-poll.service.ts | 4 ++-- src/modules/models/poll/service/poll.service.ts | 2 +- .../module/someone-once-said.module.ts | 5 +---- .../service/someone-once-said.service.spec.ts | 4 ++-- .../service/someone-once-said.service.ts | 6 +++--- .../models/version/controller/version.controller.ts | 2 +- 27 files changed, 40 insertions(+), 50 deletions(-) diff --git a/src/modules/command/command.module.ts b/src/modules/command/command.module.ts index 26fe1b3..0ae4977 100644 --- a/src/modules/command/command.module.ts +++ b/src/modules/command/command.module.ts @@ -8,16 +8,16 @@ import { BugReport } from './commands/bug'; import { CoinflipCommand } from './commands/coinflip'; import { GoldCommand } from './commands/gold'; import SomeoneOnceSaidCommand from './commands/someone-once-said'; -import { SomeoneOnceSaidModule } from '../someone-once-said/module/someone-once-said.module'; import GetRandomQuote from './commands/get-a-quote'; import { PollCommand } from './commands/poll'; -import { PollModule } from '../poll/module/poll.module'; -import { VersionModule } from '../version/module/version.module'; import { VersionCommand } from './commands/version'; -import { BirthdayEntryModule } from '../birthday/module/birthday-entry.module'; import AddBirthdayEntryCommand from './commands/add-birthday-entry'; import ActivateBirthdayEntryShoutoutCommand from './commands/activate-birthday-shoutout'; import DeactivateBirthdayEntryShoutoutCommand from './commands/deactivate-birthday-shoutout'; +import { SomeoneOnceSaidModule } from '../models/someone-once-said/module/someone-once-said.module'; +import { PollModule } from '../models/poll/module/poll.module'; +import { VersionModule } from '../models/version/module/version.module'; +import { BirthdayEntryModule } from '../models/birthday/module/birthday-entry.module'; @Module({ providers: [ diff --git a/src/modules/command/commands/activate-birthday-shoutout.ts b/src/modules/command/commands/activate-birthday-shoutout.ts index 1ed6a98..3ce4648 100644 --- a/src/modules/command/commands/activate-birthday-shoutout.ts +++ b/src/modules/command/commands/activate-birthday-shoutout.ts @@ -5,8 +5,8 @@ import { } from 'discord.js'; import { ACommand } from '../command.abstract'; import { Inject } from '@nestjs/common'; - import { BirthdayEntryService } from '../../birthday/service/birthday-entry.service'; -import { CreateOrUpdateBirthdayEntryDto } from '../../birthday/dto/create-or-update-birthday-entry.dto'; +import { BirthdayEntryService } from '../../models/birthday/service/birthday-entry.service'; +import { CreateOrUpdateBirthdayEntryDto } from '../../models/birthday/dto/create-or-update-birthday-entry.dto'; export default class ActivateBirthdayEntryShoutoutCommand extends ACommand { constructor( diff --git a/src/modules/command/commands/add-birthday-entry.ts b/src/modules/command/commands/add-birthday-entry.ts index 9e9c91d..7d03fa3 100644 --- a/src/modules/command/commands/add-birthday-entry.ts +++ b/src/modules/command/commands/add-birthday-entry.ts @@ -6,8 +6,8 @@ import { } from 'discord.js'; import { ACommand } from '../command.abstract'; import { Inject } from '@nestjs/common'; -import { BirthdayEntryService } from '../../birthday/service/birthday-entry.service'; -import { CreateOrUpdateBirthdayEntryDto } from '../../birthday/dto/create-or-update-birthday-entry.dto'; +import { BirthdayEntryService } from '../../models/birthday/service/birthday-entry.service'; +import { CreateOrUpdateBirthdayEntryDto } from '../../models/birthday/dto/create-or-update-birthday-entry.dto'; export default class AddBirthdayEntryCommand extends ACommand { constructor( diff --git a/src/modules/command/commands/deactivate-birthday-shoutout.ts b/src/modules/command/commands/deactivate-birthday-shoutout.ts index 686a8d3..d16c295 100644 --- a/src/modules/command/commands/deactivate-birthday-shoutout.ts +++ b/src/modules/command/commands/deactivate-birthday-shoutout.ts @@ -1,8 +1,8 @@ import { CacheType, CommandInteraction, SlashCommandBuilder } from 'discord.js'; import { ACommand } from '../command.abstract'; import { Inject } from '@nestjs/common'; -import { BirthdayEntryService } from '../../birthday/service/birthday-entry.service'; -import { CreateOrUpdateBirthdayEntryDto } from '../../birthday/dto/create-or-update-birthday-entry.dto'; +import { BirthdayEntryService } from '../../models/birthday/service/birthday-entry.service'; +import { CreateOrUpdateBirthdayEntryDto } from '../../models/birthday/dto/create-or-update-birthday-entry.dto'; export default class DeactivateBirthdayEntryShoutoutCommand extends ACommand { constructor( diff --git a/src/modules/command/commands/get-a-quote.ts b/src/modules/command/commands/get-a-quote.ts index 3e46868..35c1372 100644 --- a/src/modules/command/commands/get-a-quote.ts +++ b/src/modules/command/commands/get-a-quote.ts @@ -5,8 +5,8 @@ import { SlashCommandBuilder, } from 'discord.js'; import { ACommand } from '../command.abstract'; -import { SomeoneOnceSaidService } from '../../someone-once-said/service/someone-once-said.service'; import { Inject } from '@nestjs/common'; +import { SomeoneOnceSaidService } from '../../models/someone-once-said/service/someone-once-said.service'; export default class GetRandomQuote extends ACommand { constructor( diff --git a/src/modules/command/commands/poll.ts b/src/modules/command/commands/poll.ts index e522a81..005f78a 100644 --- a/src/modules/command/commands/poll.ts +++ b/src/modules/command/commands/poll.ts @@ -9,7 +9,7 @@ import { SlashCommandBuilder, } from 'discord.js'; import { ACommand } from '../command.abstract'; -import { PollService } from '../../poll/service/poll.service'; +import { PollService } from '../../models/poll/service/poll.service'; @Injectable() export class PollCommand extends ACommand { diff --git a/src/modules/command/commands/someone-once-said.ts b/src/modules/command/commands/someone-once-said.ts index 3f76106..2117992 100644 --- a/src/modules/command/commands/someone-once-said.ts +++ b/src/modules/command/commands/someone-once-said.ts @@ -5,9 +5,9 @@ import { SlashCommandBuilder, } from 'discord.js'; import { ACommand } from '../command.abstract'; -import { SomeoneOnceSaidService } from '../../someone-once-said/service/someone-once-said.service'; import { Inject } from '@nestjs/common'; import { SomeoneOnceSaid } from '../../../schemas/someone-once-said.schema'; +import { SomeoneOnceSaidService } from '../../models/someone-once-said/service/someone-once-said.service'; export default class SomeoneOnceSaidCommand extends ACommand { constructor( diff --git a/src/modules/command/commands/version.ts b/src/modules/command/commands/version.ts index 7c77372..2d86931 100644 --- a/src/modules/command/commands/version.ts +++ b/src/modules/command/commands/version.ts @@ -1,7 +1,7 @@ import { Inject, Injectable } from '@nestjs/common'; import { SlashCommandBuilder } from 'discord.js'; import { ACommand } from '../command.abstract'; -import { VersionService } from '../../version/service/version.service'; +import { VersionService } from '../../models/version/service/version.service'; @Injectable() export class VersionCommand extends ACommand { diff --git a/src/modules/cron-tasks/cron-scheduler.ts b/src/modules/cron-tasks/cron-scheduler.ts index 0afd715..6d0c351 100644 --- a/src/modules/cron-tasks/cron-scheduler.ts +++ b/src/modules/cron-tasks/cron-scheduler.ts @@ -3,8 +3,8 @@ import { ITask } from './tasks/interfaces/task.interface' import BirthdayShoutoutTask from './tasks/birthday-shoutout.task' import * as cron from 'node-cron' import { Inject } from '@nestjs/common' -import { BirthdayEntryService } from '../birthday/service/birthday-entry.service' import WakeUpTask from './tasks/wake-up.task' +import { BirthdayEntryService } from '../models/birthday/service/birthday-entry.service' interface TaskEntry { diff --git a/src/modules/cron-tasks/task.module.ts b/src/modules/cron-tasks/task.module.ts index d6accfa..714df29 100644 --- a/src/modules/cron-tasks/task.module.ts +++ b/src/modules/cron-tasks/task.module.ts @@ -1,5 +1,5 @@ import { Module } from "@nestjs/common"; -import { BirthdayEntryModule } from "../birthday/module/birthday-entry.module"; +import { BirthdayEntryModule } from "../models/birthday/module/birthday-entry.module"; @Module({ diff --git a/src/modules/cron-tasks/tasks/birthday-shoutout.task.ts b/src/modules/cron-tasks/tasks/birthday-shoutout.task.ts index befa583..bc9a222 100644 --- a/src/modules/cron-tasks/tasks/birthday-shoutout.task.ts +++ b/src/modules/cron-tasks/tasks/birthday-shoutout.task.ts @@ -1,6 +1,6 @@ import { EmbedBuilder, TextChannel } from 'discord.js' import { ITask } from './interfaces/task.interface' -import { BirthdayEntryService } from '../../birthday/service/birthday-entry.service' +import { BirthdayEntryService } from '../../models/birthday/service/birthday-entry.service' export default class BirthdayShoutoutTask implements ITask { private channel: TextChannel diff --git a/src/modules/discord/discord.module.ts b/src/modules/discord/discord.module.ts index 518977c..a7a87ff 100644 --- a/src/modules/discord/discord.module.ts +++ b/src/modules/discord/discord.module.ts @@ -1,7 +1,7 @@ import { Module } from '@nestjs/common'; import { DiscordService } from './discord.service'; import { AppConfigModule } from '../../config/config.module'; -import { BirthdayEntryModule } from '../birthday/module/birthday-entry.module'; +import { BirthdayEntryModule } from '../models/birthday/module/birthday-entry.module'; @Module({ imports: [AppConfigModule, BirthdayEntryModule], diff --git a/src/modules/discord/discord.service.ts b/src/modules/discord/discord.service.ts index 72c9494..d21e2a9 100644 --- a/src/modules/discord/discord.service.ts +++ b/src/modules/discord/discord.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common'; import { Client, GatewayIntentBits } from 'discord.js'; import { AppConfigService } from '../../config/config.service'; import { CronScheduler } from '../cron-tasks/cron-scheduler'; -import { BirthdayEntryService } from '../birthday/service/birthday-entry.service'; +import { BirthdayEntryService } from '../models/birthday/service/birthday-entry.service'; @Injectable() export class DiscordService { diff --git a/src/modules/event/event.module.ts b/src/modules/event/event.module.ts index 4bef5c3..4f191b7 100644 --- a/src/modules/event/event.module.ts +++ b/src/modules/event/event.module.ts @@ -5,7 +5,7 @@ import { Interaction } from './services/interaction'; import { MessageEvent } from './services/messageEvent'; import { DiscordModule } from '../discord/discord.module'; import { CommandModule } from '../command/command.module'; -import { PollModule } from '../poll/module/poll.module'; +import { PollModule } from '../models/poll/module/poll.module'; @Module({ imports: [DiscordModule, CommandModule, PollModule], diff --git a/src/modules/event/services/interaction.spec.ts b/src/modules/event/services/interaction.spec.ts index 47febc8..622c56d 100644 --- a/src/modules/event/services/interaction.spec.ts +++ b/src/modules/event/services/interaction.spec.ts @@ -1,7 +1,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { Interaction } from './interaction'; import { CommandService } from '../../command/command.service'; -import { PollService } from '../../poll/service/poll.service'; +import { PollService } from '../../models/poll/service/poll.service'; describe('Interaction', () => { let service: Interaction; diff --git a/src/modules/event/services/interaction.ts b/src/modules/event/services/interaction.ts index 89d855e..b2c3173 100644 --- a/src/modules/event/services/interaction.ts +++ b/src/modules/event/services/interaction.ts @@ -1,18 +1,11 @@ import { - ActionRowBuilder, - ButtonBuilder, - ButtonInteraction, - ButtonStyle, - CacheType, ClientEvents, - EmbedBuilder, Events, - Message, } from 'discord.js'; import { AEvent } from '../event.abstract'; import { CommandService } from '../../command/command.service'; -import { Inject, Injectable } from '@nestjs/common'; -import { PollService } from '../../poll/service/poll.service'; +import { Injectable } from '@nestjs/common'; +import { PollService } from '../../models/poll/service/poll.service'; @Injectable() export class Interaction extends AEvent { diff --git a/src/modules/models/birthday/controller/birthday-entry.controller.ts b/src/modules/models/birthday/controller/birthday-entry.controller.ts index fb37cc0..a0d94a6 100644 --- a/src/modules/models/birthday/controller/birthday-entry.controller.ts +++ b/src/modules/models/birthday/controller/birthday-entry.controller.ts @@ -18,10 +18,10 @@ import { ApiResponse, ApiTags, } from '@nestjs/swagger'; -import { ReS } from '../../../common/res.model'; import { BirthdayEntryService } from '../service/birthday-entry.service'; -import { BirthdayEntryDocument } from '../../../schemas/birthday-entry.schema'; import { CreateOrUpdateBirthdayEntryDto } from '../dto/create-or-update-birthday-entry.dto'; +import { ReS } from '../../../../common/res.model'; +import { BirthdayEntryDocument } from '../../../../schemas/birthday-entry.schema'; @Controller('birthday-entry') @ApiTags('birthday-entry') diff --git a/src/modules/models/birthday/module/birthday-entry.module.ts b/src/modules/models/birthday/module/birthday-entry.module.ts index e9a2eff..35de104 100644 --- a/src/modules/models/birthday/module/birthday-entry.module.ts +++ b/src/modules/models/birthday/module/birthday-entry.module.ts @@ -1,8 +1,8 @@ import { Module } from '@nestjs/common'; import { MongooseModule } from '@nestjs/mongoose'; -import { BirthdayEntry, BirthdayEntrySchema } from '../../../schemas/birthday-entry.schema'; import { BirthdayEntryService } from '../service/birthday-entry.service'; import { BirthdayEntryController } from '../controller/birthday-entry.controller'; +import { BirthdayEntry, BirthdayEntrySchema } from '../../../../schemas/birthday-entry.schema'; @Module({ imports: [ diff --git a/src/modules/models/birthday/service/birthday-entry.service.ts b/src/modules/models/birthday/service/birthday-entry.service.ts index 157ef8a..1a7ae60 100644 --- a/src/modules/models/birthday/service/birthday-entry.service.ts +++ b/src/modules/models/birthday/service/birthday-entry.service.ts @@ -1,7 +1,7 @@ import { InjectModel } from '@nestjs/mongoose'; import { Model } from 'mongoose'; -import { BirthdayEntryDocument } from '../../../schemas/birthday-entry.schema'; import { CreateOrUpdateBirthdayEntryDto } from '../dto/create-or-update-birthday-entry.dto'; +import { BirthdayEntryDocument } from '../../../../schemas/birthday-entry.schema'; export class BirthdayEntryService { constructor( diff --git a/src/modules/models/poll/module/poll.module.ts b/src/modules/models/poll/module/poll.module.ts index d9c629c..8932633 100644 --- a/src/modules/models/poll/module/poll.module.ts +++ b/src/modules/models/poll/module/poll.module.ts @@ -1,8 +1,8 @@ import { Module } from '@nestjs/common'; import { MongooseModule } from '@nestjs/mongoose'; -import { Poll, PollSchema } from '../../../schemas/poll.schema'; import { DbPollService } from '../service/db-poll.service'; import { PollService } from '../service/poll.service'; +import { Poll, PollSchema } from '../../../../schemas/poll.schema'; @Module({ imports: [ diff --git a/src/modules/models/poll/service/db-poll.service.spec.ts b/src/modules/models/poll/service/db-poll.service.spec.ts index 09d8956..8a24e67 100644 --- a/src/modules/models/poll/service/db-poll.service.spec.ts +++ b/src/modules/models/poll/service/db-poll.service.spec.ts @@ -2,9 +2,9 @@ import { Test, TestingModule } from '@nestjs/testing'; import { getModelToken } from '@nestjs/mongoose'; import { Model, MongooseError } from 'mongoose'; import { DbPollService } from './db-poll.service'; -import { PollDocument } from '../../../schemas/poll.schema'; -import { PollEntity } from '../../../schemas/poll-entity.model'; import { UpdatePollDto } from '../dto/update-poll.dto'; +import { PollDocument } from '../../../../schemas/poll.schema'; +import { PollEntity } from '../../../../schemas/poll-entity.model'; // Mocking the pollModel const mockPollModel = () => ({ diff --git a/src/modules/models/poll/service/db-poll.service.ts b/src/modules/models/poll/service/db-poll.service.ts index f89492c..45bd9da 100644 --- a/src/modules/models/poll/service/db-poll.service.ts +++ b/src/modules/models/poll/service/db-poll.service.ts @@ -1,8 +1,8 @@ import { InjectModel } from '@nestjs/mongoose'; import { Model } from 'mongoose'; -import { PollDocument } from '../../../schemas/poll.schema'; -import { PollEntity } from '../../../schemas/poll-entity.model'; import { UpdatePollDto } from '../dto/update-poll.dto'; +import { PollEntity } from '../../../../schemas/poll-entity.model'; +import { PollDocument } from '../../../../schemas/poll.schema'; export class DbPollService { constructor( diff --git a/src/modules/models/poll/service/poll.service.ts b/src/modules/models/poll/service/poll.service.ts index 8a177b7..c8615c7 100644 --- a/src/modules/models/poll/service/poll.service.ts +++ b/src/modules/models/poll/service/poll.service.ts @@ -11,7 +11,7 @@ import { } from 'discord.js'; import { DbPollService } from './db-poll.service'; import { Inject } from '@nestjs/common'; -import { PollDocument } from '../../../schemas/poll.schema'; +import { PollDocument } from '../../../../schemas/poll.schema'; export class PollService { constructor( diff --git a/src/modules/models/someone-once-said/module/someone-once-said.module.ts b/src/modules/models/someone-once-said/module/someone-once-said.module.ts index 20deb78..eaf49ce 100644 --- a/src/modules/models/someone-once-said/module/someone-once-said.module.ts +++ b/src/modules/models/someone-once-said/module/someone-once-said.module.ts @@ -1,10 +1,7 @@ import { Module } from '@nestjs/common'; import { MongooseModule } from '@nestjs/mongoose'; import { SomeoneOnceSaidService } from '../service/someone-once-said.service'; -import { - SomeoneOnceSaid, - SomeoneOnceSaidSchema, -} from '../../../schemas/someone-once-said.schema'; +import { SomeoneOnceSaid, SomeoneOnceSaidSchema } from '../../../../schemas/someone-once-said.schema'; @Module({ imports: [ diff --git a/src/modules/models/someone-once-said/service/someone-once-said.service.spec.ts b/src/modules/models/someone-once-said/service/someone-once-said.service.spec.ts index 1b683f5..553d060 100644 --- a/src/modules/models/someone-once-said/service/someone-once-said.service.spec.ts +++ b/src/modules/models/someone-once-said/service/someone-once-said.service.spec.ts @@ -1,9 +1,9 @@ import { Test, TestingModule } from '@nestjs/testing'; import { Model, Error, MongooseError } from 'mongoose'; import { SomeoneOnceSaidService } from './someone-once-said.service'; -import { SomeoneOnceSaidEntity } from '../../../schemas/someone-once-said-entity.model'; -import { SomeoneOnceSaidDocument } from '../../../schemas/someone-once-said.schema'; import { getModelToken } from '@nestjs/mongoose'; +import { SomeoneOnceSaidDocument } from '../../../../schemas/someone-once-said.schema'; +import { SomeoneOnceSaidEntity } from '../../../../schemas/someone-once-said-entity.model'; describe('SomeoneOnceSaidService', () => { let service: SomeoneOnceSaidService; let modelMock: Model; diff --git a/src/modules/models/someone-once-said/service/someone-once-said.service.ts b/src/modules/models/someone-once-said/service/someone-once-said.service.ts index ee73d80..8494e05 100644 --- a/src/modules/models/someone-once-said/service/someone-once-said.service.ts +++ b/src/modules/models/someone-once-said/service/someone-once-said.service.ts @@ -1,7 +1,7 @@ import { InjectModel } from '@nestjs/mongoose'; -import { Model, Error } from 'mongoose'; -import { SomeoneOnceSaidEntity } from '../../../schemas/someone-once-said-entity.model'; -import { SomeoneOnceSaidDocument } from '../../../schemas/someone-once-said.schema'; +import { Model } from 'mongoose'; +import { SomeoneOnceSaidDocument } from '../../../../schemas/someone-once-said.schema'; +import { SomeoneOnceSaidEntity } from '../../../../schemas/someone-once-said-entity.model'; export class SomeoneOnceSaidService { constructor( diff --git a/src/modules/models/version/controller/version.controller.ts b/src/modules/models/version/controller/version.controller.ts index de4581d..3a3e39d 100644 --- a/src/modules/models/version/controller/version.controller.ts +++ b/src/modules/models/version/controller/version.controller.ts @@ -14,8 +14,8 @@ import { ApiResponse, ApiTags, } from '@nestjs/swagger'; -import { ReS } from '../../../common/res.model'; import { VersionService } from '../service/version.service'; +import { ReS } from '../../../../common/res.model'; @Controller('version') @ApiTags('version')