Spaces:
Runtime error
Runtime error
Download src/modules/call/call.controller.ts from MuhammadNoman7600/qwen_2.5_model: direct link, hf CLI and curl.
- Browser
- Download file 1.18 kB
-
https://huggingface.co/spaces/MuhammadNoman7600/qwen_2.5_model/resolve/main/src/modules/call/call.controller.ts
- Command line
-
hf download hf://spaces/MuhammadNoman7600/qwen_2.5_model/src/modules/call/call.controller.ts
-
curl -L -o call.controller.ts https://huggingface.co/spaces/MuhammadNoman7600/qwen_2.5_model/resolve/main/src/modules/call/call.controller.ts
1.18 kB
| import { Controller, Post, Param, HttpCode, HttpStatus } from '@nestjs/common'; | |
| import { ApiTags, ApiOperation, ApiResponse, ApiParam } from '@nestjs/swagger'; | |
| import { CallService } from './call.service'; | |
| import { RequireRole } from '../auth/decorators/auth.decorators'; | |
| import { ApiKeyRole } from '../auth/entities/api-key.entity'; | |
| ('calls') | |
| ('sessions/:sessionId/calls') | |
| export class CallController { | |
| constructor(private readonly callService: CallService) {} | |
| (':callId/reject') | |
| (ApiKeyRole.OPERATOR) | |
| (HttpStatus.OK) | |
| ({ summary: 'Reject a ringing incoming call' }) | |
| ({ name: 'sessionId', description: 'Session ID' }) | |
| ({ name: 'callId', description: 'Call ID from the call.received event' }) | |
| ({ status: 200, description: 'Call rejected' }) | |
| ({ status: 400, description: 'Session is not started' }) | |
| ({ status: 404, description: 'Call not found or no longer ringing' }) | |
| async reject(('sessionId') sessionId: string, ('callId') callId: string) { | |
| await this.callService.rejectCall(sessionId, callId); | |
| return { success: true }; | |
| } | |
| } | |