Spaces:
Paused
Paused
Download apps/prevision-api/src/rendering/rendering.controller.ts from modventures/prevision: direct link, hf CLI and curl.
- Browser
- Download file 788 Bytes
-
https://huggingface.co/spaces/modventures/prevision/resolve/main/apps/prevision-api/src/rendering/rendering.controller.ts
- Command line
-
hf download hf://spaces/modventures/prevision/apps/prevision-api/src/rendering/rendering.controller.ts
-
curl -L -o rendering.controller.ts https://huggingface.co/spaces/modventures/prevision/resolve/main/apps/prevision-api/src/rendering/rendering.controller.ts
788 Bytes
| import { Controller, HttpCode, Post, UseGuards } from '@nestjs/common'; | |
| import { CurrentAuth } from '../users/decorators/current-auth.decorator.js'; | |
| import { ClerkAuthGuard } from '../users/guards/clerk-auth.guard.js'; | |
| import type { AuthContext } from '../users/interfaces/authenticated-request.interface.js'; | |
| import type { ProcessingTokenDto } from './dto/processing-token.dto.js'; | |
| import { ProcessingTokenService } from './processing-token.service.js'; | |
| ('processing-token') | |
| (ClerkAuthGuard) | |
| export class RenderingController { | |
| constructor(private readonly tokens: ProcessingTokenService) {} | |
| () | |
| (200) | |
| issue(() { user, sessionId }: AuthContext): Promise<ProcessingTokenDto> { | |
| return this.tokens.issue(user.id, sessionId); | |
| } | |
| } | |