refactor: refactored attachment entirely
This commit is contained in:
@@ -4,7 +4,11 @@ import { AttachmentService } from '../providers/attachment.service';
|
||||
import { CreateAttachmentDto } from '../dto/attachment/create-attachment.dto';
|
||||
import { UpdateAttachmentDto } from '../dto/attachment/update-attachment.dto';
|
||||
import { TMAttachment } from '../entities/attachment.entity';
|
||||
import { AuthGuards } from '../../../common/decorators/auth-guard.decorator';
|
||||
import { AdminRoute } from '../../../common/decorators/admin.decorator';
|
||||
|
||||
@AuthGuards()
|
||||
@AdminRoute()
|
||||
@ApiTags('Task Manager - Attachments')
|
||||
@Controller('task-manager/attachments')
|
||||
export class AttachmentController {
|
||||
@@ -25,7 +29,7 @@ export class AttachmentController {
|
||||
@ApiResponse({ status: 200, description: 'Attachment found', type: TMAttachment })
|
||||
@ApiResponse({ status: 404, description: 'Attachment not found' })
|
||||
findOne(@Param('id') id: string): Promise<TMAttachment> {
|
||||
return this.attachmentService.findOne(id);
|
||||
return this.attachmentService.findOneOrFail(id);
|
||||
}
|
||||
|
||||
@Post()
|
||||
|
||||
Reference in New Issue
Block a user