Download src/modules/applications/applications.controller.ts from shizoki/Lovia: direct link, hf CLI and curl.
- Browser
- Download file 968 Bytes
-
https://huggingface.co/spaces/shizoki/Lovia/resolve/main/src/modules/applications/applications.controller.ts
- Command line
-
hf download hf://spaces/shizoki/Lovia/src/modules/applications/applications.controller.ts
-
curl -L -o applications.controller.ts https://huggingface.co/spaces/shizoki/Lovia/resolve/main/src/modules/applications/applications.controller.ts
968 Bytes
| import { Body, Controller, Get, Post, UseGuards } from '@nestjs/common'; | |
| import { TelegramUser } from '../../common/decorators/telegram-user.decorator'; | |
| import { TelegramInitDataGuard } from '../../common/guards/telegram-init-data.guard'; | |
| import { TelegramWebAppUser } from '../../common/utils/telegram-init-data.util'; | |
| import { ApplicationsService } from './applications.service'; | |
| import { ApplyDto } from './dto/apply.dto'; | |
| ('application') | |
| export class ApplicationsController { | |
| constructor(private readonly applicationsService: ApplicationsService) {} | |
| ('apply') | |
| (TelegramInitDataGuard) | |
| async apply(() telegramUser: TelegramWebAppUser, () dto: ApplyDto) { | |
| return this.applicationsService.apply(telegramUser, dto); | |
| } | |
| ('status') | |
| (TelegramInitDataGuard) | |
| async getStatus(() telegramUser: TelegramWebAppUser) { | |
| return this.applicationsService.getStatus(telegramUser); | |
| } | |
| } | |