Spaces:
Paused
Paused
Download src/conversations/conversations.controller.ts from IlyasDaoud/omnia-agent-api: direct link, hf CLI and curl.
- Browser
- Download file 807 Bytes
-
https://huggingface.co/spaces/IlyasDaoud/omnia-agent-api/resolve/main/src/conversations/conversations.controller.ts
- Command line
-
hf download hf://spaces/IlyasDaoud/omnia-agent-api/src/conversations/conversations.controller.ts
-
curl -L -o conversations.controller.ts https://huggingface.co/spaces/IlyasDaoud/omnia-agent-api/resolve/main/src/conversations/conversations.controller.ts
807 Bytes
| import { Controller, Delete, Get, Param, UseGuards } from '@nestjs/common'; | |
| import type { User } from '@prisma/client'; | |
| import { ConversationsService } from './conversations.service'; | |
| import { AuthGuard } from '../auth/auth.guard'; | |
| import { CurrentUser } from '../auth/current-user.decorator'; | |
| ('conversations') | |
| (AuthGuard) | |
| export class ConversationsController { | |
| constructor(private readonly conversations: ConversationsService) {} | |
| () | |
| list(() user: User) { | |
| return this.conversations.list(user); | |
| } | |
| (':id') | |
| get(() user: User, ('id') id: string) { | |
| return this.conversations.get(user, id); | |
| } | |
| (':id') | |
| remove(() user: User, ('id') id: string) { | |
| return this.conversations.remove(user, id); | |
| } | |
| } | |