AI Implementation feature(823): Landing Page and Login/Register Modal (#11)
This commit was merged in pull request #11.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { Controller, Get } from '@nestjs/common';
|
||||
import { ApiTags, ApiOperation } from '@nestjs/swagger';
|
||||
import { Public } from '../../common/decorators/public.decorator';
|
||||
import { BlogService } from './blog.service';
|
||||
import { PublicBlogList } from './dto/blog.dto';
|
||||
|
||||
@ApiTags('blog')
|
||||
@Controller('api/v1/blog')
|
||||
export class BlogController {
|
||||
constructor(private readonly blog: BlogService) {}
|
||||
|
||||
@Public()
|
||||
@Get('posts')
|
||||
@ApiOperation({ summary: 'Public list of published blog posts' })
|
||||
async listPosts(): Promise<PublicBlogList> {
|
||||
const posts = await this.blog.listPublished();
|
||||
return { posts };
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user