Closed ThHenrique closed 1 year ago
NestJS, Prisma, PostgresSQL, Insomnia, VSCODE, beekeeper Studio portable
CRUD de anotações das reuniões.
para visualizar as rotas, utilize o swagger e veja a aba "Meetings" em (http://localhost:3000/api)[localhost:3000/api].
A atualização do comentário da reunião só poderá ser feita pelo usuário que realizou a ação
async update(@Param('commentId') commentId: string, @Body() commentData: UpdateMeetingCommentDTO, @Request() req) { const user: User = req.user; const meetingCommentFound = await this.meetingCommentService.findById(commentId); if (meetingCommentFound === null) { throw new NotFoundException('Comentário da reunião não encontrado'); } else if (meetingCommentFound.User.id !== user.id) { throw new UnauthorizedException('Somente o usuário que criou o comentário pode editá-la.'); } const meetingCommentUpdated = await this.meetingCommentService.update(commentId, commentData); return { meetingComment: meetingCommentUpdated, message: 'Comentário da reunião Atualizado com sucesso.', }; }
Documentação
Tecnologias
NestJS, Prisma, PostgresSQL, Insomnia, VSCODE, beekeeper Studio portable
Descrição
CRUD de anotações das reuniões.
Issues Relacionada
22 #23 #24
Lista de Mudanças
Rotas
para visualizar as rotas, utilize o swagger e veja a aba "Meetings" em (http://localhost:3000/api)[localhost:3000/api].
Comentários Adicionais
A atualização do comentário da reunião só poderá ser feita pelo usuário que realizou a ação
Checklist