Closed gioliveirass closed 1 year ago
NestJS, Prisma, PostgresSQL, Insomnia, VSCODE, beekeeper Studio portable
URL: domain.api.com.br/meetings/:id Method: DELETE
@Delete('/:id')
@UseGuards(AuthGuard('jwt'))
async deleteMeeting(@Param('id') id: string) {
const meetingFound = await this.meetingService.findById(id);
if (meetingFound === null) throw new NotFoundException('Reunião não encontrada.');
await this.meetingService.delete(id);
return { message: 'Reunião deletada com sucesso.' };
}
delete(id: string) {
return this.prismaService.meeting.delete({
where: {
id: id,
},
});
}
@drisabelles @GabrielCamargoL show
Descrição da atividade
Criar rota para deletar uma reunião.
Informações para execução da atividade
Somente o usuário administrador pode realizar esta ação.DoR
DoD