27 lines
No EOL
918 B
TypeScript
27 lines
No EOL
918 B
TypeScript
import { Controller, Get } from '@nestjs/common';
|
|
import { ApiTags } from '@nestjs/swagger';
|
|
import { IChannel } from '../interfaces/channel.interface';
|
|
import { IClient } from '../interfaces/client.interface';
|
|
import { IPopulatedChannel } from '../interfaces/populatedchannel.interface';
|
|
import { TeamspeakService } from '../services/teamspeak.service';
|
|
|
|
@Controller('api')
|
|
@ApiTags('teamspeak')
|
|
export class TeamspeakController {
|
|
constructor(private teamspeakService: TeamspeakService) {}
|
|
|
|
@Get('clients')
|
|
async getClients(): Promise<IClient[]> {
|
|
return this.teamspeakService.getClients();
|
|
}
|
|
|
|
@Get('channels')
|
|
async getChannels(): Promise<IChannel[]> {
|
|
return this.teamspeakService.getChannels();
|
|
}
|
|
|
|
@Get('populatedChannelList')
|
|
async getPopulatedChannelList(): Promise<IPopulatedChannel[]> {
|
|
return this.teamspeakService.getPopulatedChannelList();
|
|
}
|
|
} |