Skip to content

Commit

Permalink
fix: numeric rankings
Browse files Browse the repository at this point in the history
  • Loading branch information
Fllorent0D committed Feb 23, 2023
1 parent fe12fed commit d8738a7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/api/api.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { MemberModule } from './member/member.module';
import { MatchModule } from './match/match.module';
import { HealthModule } from './health/health.module';
import { InternalIdentifiersModule } from './internal-identifiers/internal-identifiers.module';
import { UserAgentModule } from './user-agent/user-agent.module';

@Module({
imports: [
Expand All @@ -17,6 +18,7 @@ import { InternalIdentifiersModule } from './internal-identifiers/internal-ident
MemberModule,
MatchModule,
HealthModule,
UserAgentModule,
InternalIdentifiersModule,
],
})
Expand Down
13 changes: 13 additions & 0 deletions src/api/user-agent/user-agent.controller.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Controller, Get } from '@nestjs/common';
import { UserAgentsUtil } from '../../common/utils/user-agents.util';

@Controller({
path: 'user-agent',
version: '1',
})
export class UserAgentController {
@Get('random')
generateRandomUserAgent() {
return { ua: UserAgentsUtil.random };
}
}
9 changes: 9 additions & 0 deletions src/api/user-agent/user-agent.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Module } from '@nestjs/common';
import { UserAgentController } from './user-agent.controller';

@Module({
imports: [],
controllers: [UserAgentController],
})
export class UserAgentModule {
}

0 comments on commit d8738a7

Please sign in to comment.