Download apps/server/src/app.controller.ts from fukeke/rss: direct link, hf CLI and curl.
- Browser
- Download file 990 Bytes
-
https://huggingface.co/spaces/fukeke/rss/resolve/main/apps/server/src/app.controller.ts
- Command line
-
hf download hf://spaces/fukeke/rss/apps/server/src/app.controller.ts
-
curl -L -o app.controller.ts https://huggingface.co/spaces/fukeke/rss/resolve/main/apps/server/src/app.controller.ts
990 Bytes
| import { Controller, Get, Redirect, Render } from '@nestjs/common'; | |
| import { AppService } from './app.service'; | |
| import { ConfigService } from '@nestjs/config'; | |
| import { ConfigurationType } from './configuration'; | |
| () | |
| export class AppController { | |
| constructor( | |
| private readonly appService: AppService, | |
| private readonly configService: ConfigService, | |
| ) {} | |
| () | |
| getHello(): string { | |
| return this.appService.getHello(); | |
| } | |
| ('/robots.txt') | |
| forRobot(): string { | |
| return 'User-agent: *\nDisallow: /'; | |
| } | |
| ('favicon.ico') | |
| ('https://r2-assets.111965.xyz/wewe-rss.png', 302) | |
| getFavicon() {} | |
| ('/dash*') | |
| ('index.hbs') | |
| dashRender() { | |
| const { originUrl: weweRssServerOriginUrl } = | |
| this.configService.get<ConfigurationType['feed']>('feed')!; | |
| const { code } = this.configService.get<ConfigurationType['auth']>('auth')!; | |
| return { | |
| weweRssServerOriginUrl, | |
| enabledAuthCode: !!code, | |
| }; | |
| } | |
| } | |