github-actions[bot]
Deploy Backend from GitHub Actions Commit: ca37b2a1c9dd5c702619ea7ae7b3260d2fb5663d
b185a6d | import { | |
| Controller, | |
| Get, | |
| Post, | |
| Body, | |
| Param, | |
| Put, | |
| Delete, | |
| UseGuards, | |
| } from "@nestjs/common"; | |
| import { PhilosofunService } from "./philosofun.service"; | |
| import { ApiTags, ApiOperation, ApiBearerAuth } from "@nestjs/swagger"; | |
| import { JwtAuthGuard } from "../auth/jwt-auth.guard"; | |
| import { RolesGuard } from "../auth/roles.guard"; | |
| import { Roles } from "../auth/roles.decorator"; | |
| import { CreatePhilosofunDto } from "./dto/create-philosofun.dto"; | |
| import { UpdatePhilosofunDto } from "./dto/update-philosofun.dto"; | |
| ("Philosofun") | |
| ("philosofun") | |
| (JwtAuthGuard, RolesGuard) | |
| () | |
| export class PhilosofunController { | |
| constructor(private readonly service: PhilosofunService) {} | |
| () | |
| ("admin") | |
| ({ summary: "Upload a new Philosofun video" }) | |
| async create(() dto: CreatePhilosofunDto) { | |
| return this.service.create(dto); | |
| } | |
| () | |
| ({ summary: "List all Philosofun videos" }) | |
| async findAll() { | |
| return this.service.findAll(); | |
| } | |
| (":id") | |
| ({ summary: "Get single video details" }) | |
| async findOne(("id") id: string) { | |
| return this.service.findOne(id); | |
| } | |
| (":id") | |
| ("admin") | |
| ({ summary: "Update a video" }) | |
| async update(("id") id: string, () dto: UpdatePhilosofunDto) { | |
| return this.service.update(id, dto); | |
| } | |
| (":id") | |
| ("admin") | |
| ({ summary: "Delete a video" }) | |
| async remove(("id") id: string) { | |
| return this.service.remove(id); | |
| } | |
| } | |