Lovia / src /modules /preview /preview.controller.ts
shizoki's picture
init
fb13f0c
Raw History Blame Contribute Delete
913 Bytes
import { Controller, Get, Param, UseGuards } from '@nestjs/common';
import { PreviewModeGuard } from './preview-mode.guard';
import { PreviewService } from './preview.service';
@Controller('preview')
@UseGuards(PreviewModeGuard)
export class PreviewController {
constructor(private readonly previewService: PreviewService) {}
@Get('config')
getConfig() {
return this.previewService.getConfig();
}
@Get('feed')
getFeed() {
return this.previewService.getFeed();
}
@Get('characters')
getCharacters() {
return this.previewService.getCharacters();
}
@Get('characters/:slug')
getCharacter(@Param('slug') slug: string) {
return this.previewService.getCharacter(slug);
}
@Get('chats')
getChats() {
return this.previewService.getChats();
}
@Get('chats/:chatId')
getChat(@Param('chatId') chatId: string) {
return this.previewService.getChat(chatId);
}
}