import { Body, Controller, Delete, Get, Post, Query, UploadedFile, UseInterceptors } from '@nestjs/common';
import { DocumentService } from './document.service';
import { ApiBody, ApiConsumes, ApiTags } from '@nestjs/swagger';
import { FileInterceptor } from '@nestjs/platform-express';
import { MessagePattern, Payload } from '@nestjs/microservices';
import * as dto from './dto/index'

@ApiTags("Documnet")
@Controller('document')
export class DocumentController {
  constructor(private readonly documentService: DocumentService) { }
  

  @Get()
  async getDocument(@Query() query: dto.pl) {
    try {
      return await this.documentService.get_document(query)
    } catch (error) {
      throw error
    }
  }

}

