Update React, fix null dates, add default route for missing season ID and move blurred area effect to table only
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -32,8 +32,9 @@ export class AppController {
|
||||
return await this.sinusBotService.fetchStats();
|
||||
}
|
||||
|
||||
@Get('/stats/season/:id')
|
||||
@Get('/stats/season/:id?')
|
||||
async getStats(@Param('id') id?: string): Promise<UserStatsResponse> {
|
||||
logger.info(`Got id ${id}`)
|
||||
return await this.databaseService
|
||||
.fetchStats(id)
|
||||
.catch(err => {
|
||||
|
||||
@@ -7,6 +7,7 @@ import {
|
||||
} from '../models/aliases';
|
||||
import { PrismaService } from '../prisma/prisma.service';
|
||||
import { seasons } from '@prisma/client';
|
||||
import logger from 'src/logger/Logger';
|
||||
|
||||
@Injectable()
|
||||
export class DatabaseService {
|
||||
@@ -25,7 +26,7 @@ export class DatabaseService {
|
||||
})
|
||||
.then(value => this.prismaClient.seasons.findUnique({
|
||||
where: {
|
||||
season_id: Number((!seasonId ? value : seasonId))
|
||||
season_id: Number(seasonId ?? value)
|
||||
}
|
||||
}) as Promise<seasons>)
|
||||
.then((result: SeasonInfo) => {
|
||||
|
||||
Reference in New Issue
Block a user