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