website cleanup
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Controller, Get, Post, Body } from '@nestjs/common';
|
||||
import { Controller, Get, Post, Body, Query } from '@nestjs/common';
|
||||
import { AuthService } from './AuthService';
|
||||
import { LoginParams, SignupParams, AuthSessionDTO } from './dtos/AuthDto';
|
||||
import type { CommandResultDTO } from './presenters/CommandResultPresenter';
|
||||
@@ -26,4 +26,19 @@ export class AuthController {
|
||||
async logout(): Promise<CommandResultDTO> {
|
||||
return this.authService.logout();
|
||||
}
|
||||
|
||||
@Get('iracing/start')
|
||||
async startIracingAuth(@Query('returnTo') returnTo?: string): Promise<{ redirectUrl: string }> {
|
||||
const redirectUrl = await this.authService.startIracingAuth(returnTo);
|
||||
return { redirectUrl };
|
||||
}
|
||||
|
||||
@Get('iracing/callback')
|
||||
async iracingCallback(
|
||||
@Query('code') code: string,
|
||||
@Query('state') state: string,
|
||||
@Query('returnTo') returnTo?: string,
|
||||
): Promise<AuthSessionDTO> {
|
||||
return this.authService.iracingCallback(code, state, returnTo);
|
||||
}
|
||||
}
|
||||
|
||||
50
apps/api/src/domain/league/dtos/LeagueScoringConfigDTO.ts
Normal file
50
apps/api/src/domain/league/dtos/LeagueScoringConfigDTO.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
|
||||
export class LeagueScoringChampionshipDTO {
|
||||
@ApiProperty()
|
||||
id!: string;
|
||||
|
||||
@ApiProperty()
|
||||
name!: string;
|
||||
|
||||
@ApiProperty()
|
||||
type!: string;
|
||||
|
||||
@ApiProperty()
|
||||
sessionTypes!: string[];
|
||||
|
||||
@ApiProperty()
|
||||
pointsPreview!: Array<{ sessionType: string; position: number; points: number }>;
|
||||
|
||||
@ApiProperty()
|
||||
bonusSummary!: string[];
|
||||
|
||||
@ApiProperty()
|
||||
dropPolicyDescription!: string;
|
||||
}
|
||||
|
||||
export class LeagueScoringConfigDTO {
|
||||
@ApiProperty()
|
||||
leagueId!: string;
|
||||
|
||||
@ApiProperty()
|
||||
seasonId!: string;
|
||||
|
||||
@ApiProperty()
|
||||
gameId!: string;
|
||||
|
||||
@ApiProperty()
|
||||
gameName!: string;
|
||||
|
||||
@ApiProperty({ required: false })
|
||||
scoringPresetId?: string;
|
||||
|
||||
@ApiProperty({ required: false })
|
||||
scoringPresetName?: string;
|
||||
|
||||
@ApiProperty()
|
||||
dropPolicySummary!: string;
|
||||
|
||||
@ApiProperty({ type: [LeagueScoringChampionshipDTO] })
|
||||
championships!: LeagueScoringChampionshipDTO[];
|
||||
}
|
||||
Reference in New Issue
Block a user