Spaces:
Runtime error
Runtime error
Download src/app/posts/posts.controller.ts from WaiYanLynn/meow-map: direct link, hf CLI and curl.
- Browser
- Download file 894 Bytes
-
https://huggingface.co/spaces/WaiYanLynn/meow-map/resolve/main/src/app/posts/posts.controller.ts
- Command line
-
hf download hf://spaces/WaiYanLynn/meow-map/src/app/posts/posts.controller.ts
-
curl -L -o posts.controller.ts https://huggingface.co/spaces/WaiYanLynn/meow-map/resolve/main/src/app/posts/posts.controller.ts
894 Bytes
| import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common'; | |
| import { PostsService } from './posts.service'; | |
| import { CreatePostDto } from './dto/create-post.dto'; | |
| import { UpdatePostDto } from './dto/update-post.dto'; | |
| ('posts') | |
| export class PostsController { | |
| constructor(private readonly postsService: PostsService) {} | |
| () | |
| create(() createPostDto: CreatePostDto) { | |
| return this.postsService.create(createPostDto); | |
| } | |
| () | |
| findAll() { | |
| return this.postsService.findAll(); | |
| } | |
| (':id') | |
| findOne(('id') id: string) { | |
| return this.postsService.findOne(+id); | |
| } | |
| (':id') | |
| update(('id') id: string, () updatePostDto: UpdatePostDto) { | |
| return this.postsService.update(+id, updatePostDto); | |
| } | |
| (':id') | |
| remove(('id') id: string) { | |
| return this.postsService.remove(+id); | |
| } | |
| } | |