14 lines
291 B
TypeScript
14 lines
291 B
TypeScript
import { Controller, Get } from '@nestjs/common';
|
|
|
|
import { PostService } from '../services/post.service';
|
|
|
|
@Controller('posts')
|
|
export class PostController {
|
|
constructor(private postService: PostService) {}
|
|
|
|
@Get()
|
|
async list() {
|
|
return this.postService.list();
|
|
}
|
|
}
|