Files
epess-web-backend/src/Restful/restful.controller.ts
Ly Tuan Kiet 9500471faf feat: enhance document processing with AI suggestions and preview image support
- Added AI_SUGGESTION event to DocumentEvent enum for improved document interaction.
- Implemented updateDocumentPreviewImage mutation in DocumentSchema to allow updating of document preview images.
- Integrated grammar checking functionality in DocumentService, utilizing OpenAI for real-time suggestions and caching results in Redis.
- Enhanced MinioService with methods for file upsert and document content retrieval.
- Updated PrismaTypes to include new relations and fields for better data structure alignment.
- Commented out unused RESTful service methods for future cleanup.

These changes improve the document editing experience by leveraging AI capabilities and enhancing the schema for better data management.
2024-12-10 23:27:05 +07:00

59 lines
1.7 KiB
TypeScript

import { Body, Controller, Delete, Get, Param, Post, Put } from '@nestjs/common'
import { ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger'
import { RestfulService } from './restful.service'
@ApiTags('Restful')
@Controller('restful')
export class RestfulController {
constructor(private readonly restfulService: RestfulService) {}
// @Get()
// @ApiOperation({ summary: 'Get all items' })
// @ApiResponse({ status: 200, description: 'Returns all items.' })
// getAllItems() {
// return this.restfulService.getAllItems()
// }
// @Get(':id')
// @ApiOperation({ summary: 'Get an item by ID' })
// @ApiResponse({
// status: 200,
// description: 'Returns the item with the given ID.',
// })
// getItem(@Param('id') id: string) {
// return this.restfulService.getItem(id);
// }
// @Post()
// @ApiOperation({ summary: 'Create a new item' })
// @ApiResponse({
// status: 201,
// description: 'The item has been successfully created.',
// })
// createItem(@Body() createDto: any) {
// return this.restfulService.createItem(createDto);
// }
// @Put(':id')
// @ApiOperation({ summary: 'Update an item' })
// @ApiResponse({
// status: 200,
// description: 'The item has been successfully updated.',
// })
// updateItem(@Param('id') id: string, @Body() updateDto: any) {
// return this.restfulService.updateItem(id, updateDto);
// }
// @Delete(':id')
// @ApiOperation({ summary: 'Delete an item' })
// @ApiResponse({
// status: 200,
// description: 'The item has been successfully deleted.',
// })
// deleteItem(@Param('id') id: string) {
// return this.restfulService.deleteItem(id);
// }
}
export default RestfulController