20 lines
566 B
TypeScript
20 lines
566 B
TypeScript
import { Controller, Get, Query } from '@nestjs/common';
|
|
import { AllowPublicAccess } from '../auth/allow-public-access.decorator';
|
|
import {
|
|
RiotDdragonService,
|
|
type DdragonManifest,
|
|
} from './riot-ddragon.service';
|
|
|
|
@Controller('riot/ddragon')
|
|
export class RiotDdragonController {
|
|
constructor(private readonly ddragonService: RiotDdragonService) {}
|
|
|
|
@Get('manifest')
|
|
@AllowPublicAccess()
|
|
public async getManifest(
|
|
@Query('locale') locale?: string,
|
|
): Promise<DdragonManifest> {
|
|
return this.ddragonService.getManifest(locale ?? 'ko_KR');
|
|
}
|
|
}
|