Spaces:
Runtime error
Runtime error
Download src/app/comments/comments.controller.ts from WaiYanLynn/meow-map: direct link, hf CLI and curl.
- Browser
- Download file 957 Bytes
-
https://huggingface.co/spaces/WaiYanLynn/meow-map/resolve/main/src/app/comments/comments.controller.ts
- Command line
-
hf download hf://spaces/WaiYanLynn/meow-map/src/app/comments/comments.controller.ts
-
curl -L -o comments.controller.ts https://huggingface.co/spaces/WaiYanLynn/meow-map/resolve/main/src/app/comments/comments.controller.ts
957 Bytes
| import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common'; | |
| import { CommentsService } from './comments.service'; | |
| import { CreateCommentDto } from './dto/create-comment.dto'; | |
| import { UpdateCommentDto } from './dto/update-comment.dto'; | |
| ('comments') | |
| export class CommentsController { | |
| constructor(private readonly commentsService: CommentsService) {} | |
| () | |
| create(() createCommentDto: CreateCommentDto) { | |
| return this.commentsService.create(createCommentDto); | |
| } | |
| () | |
| findAll() { | |
| return this.commentsService.findAll(); | |
| } | |
| (':id') | |
| findOne(('id') id: string) { | |
| return this.commentsService.findOne(+id); | |
| } | |
| (':id') | |
| update(('id') id: string, () updateCommentDto: UpdateCommentDto) { | |
| return this.commentsService.update(+id, updateCommentDto); | |
| } | |
| (':id') | |
| remove(('id') id: string) { | |
| return this.commentsService.remove(+id); | |
| } | |
| } | |