Update carousels, card hover, and IranBay branding.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
import {
|
||||
Body,
|
||||
Controller,
|
||||
Delete,
|
||||
Get,
|
||||
Param,
|
||||
Patch,
|
||||
Post,
|
||||
} from '@nestjs/common';
|
||||
import {
|
||||
CreateWebsiteBlogCategoryDto,
|
||||
CreateWebsiteBlogPostDto,
|
||||
} from './dto/website-blog.dto';
|
||||
import { WebsiteBlogService } from './website-blog.service';
|
||||
|
||||
@Controller('website/blog')
|
||||
export class WebsiteBlogController {
|
||||
constructor(private readonly blog: WebsiteBlogService) {}
|
||||
|
||||
@Get('categories')
|
||||
listCategories() {
|
||||
return this.blog.listCategories();
|
||||
}
|
||||
|
||||
@Post('categories')
|
||||
createCategory(@Body() body: CreateWebsiteBlogCategoryDto) {
|
||||
return this.blog.createCategory(body);
|
||||
}
|
||||
|
||||
@Patch('categories/:id')
|
||||
updateCategory(
|
||||
@Param('id') id: string,
|
||||
@Body() body: CreateWebsiteBlogCategoryDto,
|
||||
) {
|
||||
return this.blog.updateCategory(id, body);
|
||||
}
|
||||
|
||||
@Delete('categories/:id')
|
||||
deleteCategory(@Param('id') id: string) {
|
||||
return this.blog.deleteCategory(id);
|
||||
}
|
||||
|
||||
@Get('posts')
|
||||
listPosts() {
|
||||
return this.blog.listPosts();
|
||||
}
|
||||
|
||||
@Post('posts')
|
||||
createPost(@Body() body: CreateWebsiteBlogPostDto) {
|
||||
return this.blog.createPost(body);
|
||||
}
|
||||
|
||||
@Delete('posts/:id')
|
||||
deletePost(@Param('id') id: string) {
|
||||
return this.blog.deletePost(id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user