a little bit of this a little bit of that
This commit is contained in:
@@ -15,6 +15,7 @@ import { AlbumModule } from './album/album.module';
|
||||
import { SearchModule } from './search/search.module';
|
||||
import { HistoryModule } from './history/history.module';
|
||||
import { MailerModule } from '@nestjs-modules/mailer';
|
||||
import { ScoresModule } from './scores/scores.module';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
@@ -29,6 +30,7 @@ import { MailerModule } from '@nestjs-modules/mailer';
|
||||
SearchModule,
|
||||
SettingsModule,
|
||||
HistoryModule,
|
||||
ScoresModule,
|
||||
MailerModule.forRoot({
|
||||
transport: process.env.SMTP_TRANSPORT,
|
||||
defaults: {
|
||||
|
||||
@@ -13,7 +13,7 @@ export class ScoresController {
|
||||
|
||||
|
||||
@ApiOkResponse({ description: 'Successfully sent the Top 20 players'})
|
||||
@Get('scores/top/20')
|
||||
@Get('top/20')
|
||||
getTopTwenty(): Promise<User[]> {
|
||||
return this.scoresService.topTwenty();
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ export class ScoresService {
|
||||
async topTwenty(): Promise<User[]> {
|
||||
return this.prisma.user.findMany({
|
||||
orderBy: {
|
||||
partyPlayed: 'desc',
|
||||
totalScore: 'desc',
|
||||
},
|
||||
take: 20,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user