website refactor
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { ForbiddenException, InternalServerErrorException, NotFoundException } from '@nestjs/common';
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { vi, type MockedFunction } from 'vitest';
|
||||
import { ForbiddenException, InternalServerErrorException, NotFoundException } from '@nestjs/common';
|
||||
import { ProtestsController } from './ProtestsController';
|
||||
import { ProtestsService } from './ProtestsService';
|
||||
import { ReviewProtestCommandDTO } from '../race/dtos/ReviewProtestCommandDTO';
|
||||
import type { ReviewProtestResponseDTO } from './presenters/ReviewProtestPresenter';
|
||||
import { ProtestsController } from './ProtestsController';
|
||||
import { ProtestsService } from './ProtestsService';
|
||||
|
||||
describe('ProtestsController', () => {
|
||||
let controller: ProtestsController;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Body, Controller, ForbiddenException, HttpCode, HttpStatus, Inject, InternalServerErrorException, NotFoundException, Param, Post, Req, UnauthorizedException } from '@nestjs/common';
|
||||
import { ApiOperation, ApiParam, ApiResponse, ApiTags } from '@nestjs/swagger';
|
||||
import { ProtestsService } from './ProtestsService';
|
||||
import { ReviewProtestCommandDTO } from '../race/dtos/ReviewProtestCommandDTO';
|
||||
import type { ReviewProtestResponseDTO } from './presenters/ReviewProtestPresenter';
|
||||
import { ProtestsService } from './ProtestsService';
|
||||
|
||||
type AuthenticatedRequest = {
|
||||
user?: { userId: string };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { ProtestsModule } from './ProtestsModule';
|
||||
import { ProtestsController } from './ProtestsController';
|
||||
import { ProtestsModule } from './ProtestsModule';
|
||||
|
||||
describe('ProtestsModule', () => {
|
||||
let module: TestingModule;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { RacingPersistenceModule } from '../../persistence/racing/RacingPersistenceModule';
|
||||
import { ProtestsController } from './ProtestsController';
|
||||
import { ProtestsService } from './ProtestsService';
|
||||
import { ProtestsProviders } from './ProtestsProviders';
|
||||
import { ProtestsService } from './ProtestsService';
|
||||
|
||||
@Module({
|
||||
imports: [RacingPersistenceModule],
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { describe, it, expect, beforeEach, vi, type MockedFunction } from 'vitest';
|
||||
import { Result } from '@core/shared/domain/Result';
|
||||
import type { Logger } from '@core/shared/application/Logger';
|
||||
import type {
|
||||
ReviewProtestUseCase,
|
||||
ReviewProtestApplicationError,
|
||||
ReviewProtestResult,
|
||||
ReviewProtestApplicationError,
|
||||
ReviewProtestResult,
|
||||
ReviewProtestUseCase,
|
||||
} from '@core/racing/application/use-cases/ReviewProtestUseCase';
|
||||
import type { Logger } from '@core/shared/application/Logger';
|
||||
import { Result } from '@core/shared/domain/Result';
|
||||
import { beforeEach, describe, expect, it, vi, type MockedFunction } from 'vitest';
|
||||
import { ProtestsService } from './ProtestsService';
|
||||
import { ReviewProtestPresenter, type ReviewProtestResponseDTO } from './presenters/ReviewProtestPresenter';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import type { Logger } from '@core/shared/application/Logger';
|
||||
import { Inject, Injectable } from '@nestjs/common';
|
||||
|
||||
// Use cases
|
||||
import { ReviewProtestUseCase } from '@core/racing/application/use-cases/ReviewProtestUseCase';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { ReviewProtestApplicationError, ReviewProtestResult } from '@core/racing/application/use-cases/ReviewProtestUseCase';
|
||||
import type { UseCaseOutputPort } from '@core/shared/application';
|
||||
import type { ReviewProtestResult, ReviewProtestApplicationError } from '@core/racing/application/use-cases/ReviewProtestUseCase';
|
||||
|
||||
export interface ReviewProtestResponseDTO {
|
||||
success: boolean;
|
||||
|
||||
Reference in New Issue
Block a user