Download src/modules/preview/preview.controller.ts from shizoki/Lovia: direct link, hf CLI and curl.
- Browser
- Download file 913 Bytes
-
https://huggingface.co/spaces/shizoki/Lovia/resolve/main/src/modules/preview/preview.controller.ts
- Command line
-
hf download hf://spaces/shizoki/Lovia/src/modules/preview/preview.controller.ts
-
curl -L -o preview.controller.ts https://huggingface.co/spaces/shizoki/Lovia/resolve/main/src/modules/preview/preview.controller.ts
913 Bytes
| import { Controller, Get, Param, UseGuards } from '@nestjs/common'; | |
| import { PreviewModeGuard } from './preview-mode.guard'; | |
| import { PreviewService } from './preview.service'; | |
| ('preview') | |
| (PreviewModeGuard) | |
| export class PreviewController { | |
| constructor(private readonly previewService: PreviewService) {} | |
| ('config') | |
| getConfig() { | |
| return this.previewService.getConfig(); | |
| } | |
| ('feed') | |
| getFeed() { | |
| return this.previewService.getFeed(); | |
| } | |
| ('characters') | |
| getCharacters() { | |
| return this.previewService.getCharacters(); | |
| } | |
| ('characters/:slug') | |
| getCharacter(('slug') slug: string) { | |
| return this.previewService.getCharacter(slug); | |
| } | |
| ('chats') | |
| getChats() { | |
| return this.previewService.getChats(); | |
| } | |
| ('chats/:chatId') | |
| getChat(('chatId') chatId: string) { | |
| return this.previewService.getChat(chatId); | |
| } | |
| } | |