fix issues in api
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { vi } from 'vitest';
|
||||
import { AnalyticsController } from './AnalyticsController';
|
||||
import { AnalyticsService } from './AnalyticsService';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Mock, vi } from 'vitest';
|
||||
import { AuthController } from './AuthController';
|
||||
import { AuthService } from './AuthService';
|
||||
import { AuthSessionDTO, LoginParams, SignupParams } from './dtos/AuthDto';
|
||||
import { AuthSessionDTO, LoginParamsDTO, SignupParamsDTO } from './dtos/AuthDto';
|
||||
import type { CommandResultDTO } from './presenters/CommandResultPresenter';
|
||||
|
||||
describe('AuthController', () => {
|
||||
@@ -21,7 +21,7 @@ describe('AuthController', () => {
|
||||
|
||||
describe('signup', () => {
|
||||
it('should call service.signupWithEmail and return session DTO', async () => {
|
||||
const params: SignupParams = {
|
||||
const params: SignupParamsDTO = {
|
||||
email: 'test@example.com',
|
||||
password: 'password123',
|
||||
displayName: 'Test User',
|
||||
@@ -48,7 +48,7 @@ describe('AuthController', () => {
|
||||
|
||||
describe('login', () => {
|
||||
it('should call service.loginWithEmail and return session DTO', async () => {
|
||||
const params: LoginParams = {
|
||||
const params: LoginParamsDTO = {
|
||||
email: 'test@example.com',
|
||||
password: 'password123',
|
||||
};
|
||||
|
||||
@@ -5,7 +5,6 @@ import { Race } from '@core/racing/domain/entities/Race';
|
||||
import { Standing } from '@core/racing/domain/entities/Standing';
|
||||
import { Result as RaceResult } from '@core/racing/domain/entities/result/Result';
|
||||
import type { FeedItem } from '@core/social/domain/types/FeedItem';
|
||||
import { Result } from '@core/shared/application/Result';
|
||||
import { beforeEach, describe, expect, it } from 'vitest';
|
||||
import { DashboardOverviewPresenter } from './DashboardOverviewPresenter';
|
||||
|
||||
@@ -160,4 +159,4 @@ describe('DashboardOverviewPresenter', () => {
|
||||
expect(dto.friends[0]!.id).toBe('friend-1');
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Provider } from '@nestjs/common';
|
||||
import { DriverService } from './DriverService';
|
||||
|
||||
// Import core interfaces
|
||||
import { DriverExtendedProfileProvider } from '@core/racing/application/ports/DriverExtendedProfileProvider';
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Global, Module } from '@nestjs/common';
|
||||
import { Logger } from '@core/shared/application/Logger';
|
||||
import { ConsoleLogger } from '@adapters/logging/ConsoleLogger';
|
||||
|
||||
@Global()
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Provider } from '@nestjs/common';
|
||||
import { MediaService } from './MediaService';
|
||||
|
||||
// Import core interfaces
|
||||
import { IAvatarGenerationRepository } from '@core/media/domain/repositories/IAvatarGenerationRepository';
|
||||
@@ -228,4 +227,4 @@ export const MediaProviders: Provider[] = [
|
||||
new UpdateAvatarUseCase(avatarRepo, output, logger),
|
||||
inject: [AVATAR_REPOSITORY_TOKEN, UPDATE_AVATAR_OUTPUT_PORT_TOKEN, LOGGER_TOKEN],
|
||||
},
|
||||
];
|
||||
];
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Provider } from '@nestjs/common';
|
||||
import { PaymentsService } from './PaymentsService';
|
||||
|
||||
// Import core interfaces
|
||||
import type { IPaymentRepository } from '@core/payments/domain/repositories/IPaymentRepository';
|
||||
@@ -248,4 +247,4 @@ export const PaymentsProviders: Provider[] = [
|
||||
new ProcessWalletTransactionUseCase(walletRepo, transactionRepo, output),
|
||||
inject: [WALLET_REPOSITORY_TOKEN, TRANSACTION_REPOSITORY_TOKEN, PROCESS_WALLET_TRANSACTION_OUTPUT_PORT_TOKEN],
|
||||
},
|
||||
];
|
||||
];
|
||||
@@ -1,5 +1,4 @@
|
||||
import type { Provider } from '@nestjs/common';
|
||||
import { RaceService } from './RaceService';
|
||||
|
||||
// Import core interfaces
|
||||
import type { DriverRatingProvider } from '@core/racing/application/ports/DriverRatingProvider';
|
||||
|
||||
@@ -2,7 +2,6 @@ import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { vi } from 'vitest';
|
||||
import { TeamController } from './TeamController';
|
||||
import { TeamService } from './TeamService';
|
||||
import type { Request } from 'express';
|
||||
import { CreateTeamInputDTO } from './dtos/CreateTeamInputDTO';
|
||||
import { UpdateTeamInput } from './dtos/TeamDto';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
|
||||
import { TeamDTO } from './TeamDTO';
|
||||
import { TeamDTO } from './TeamDto';
|
||||
import { TeamMembershipDTO } from './TeamMembershipDTO';
|
||||
|
||||
export class GetDriverTeamOutputDTO {
|
||||
@@ -15,4 +15,4 @@ export class GetDriverTeamOutputDTO {
|
||||
|
||||
@ApiProperty()
|
||||
canManage!: boolean;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
|
||||
import { TeamDTO } from './TeamDTO';
|
||||
import { TeamDTO } from './TeamDto';
|
||||
import { TeamMembershipDTO } from './TeamMembershipDTO';
|
||||
|
||||
export class GetTeamDetailsOutputDTO {
|
||||
@@ -12,4 +12,4 @@ export class GetTeamDetailsOutputDTO {
|
||||
|
||||
@ApiProperty()
|
||||
canManage!: boolean;
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,6 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import * as fs from 'fs/promises';
|
||||
import * as path from 'path';
|
||||
import { glob } from 'glob';
|
||||
|
||||
interface OpenAPISchema {
|
||||
type?: string;
|
||||
|
||||
Reference in New Issue
Block a user