From 4016f0820bc397139fd43e5c3c4d97b26a572595 Mon Sep 17 00:00:00 2001 From: devxb Date: Sat, 17 Feb 2024 00:40:56 +0900 Subject: [PATCH] release: 0.6.0 --- .../net/teumteum/controller/QaController.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/main/java/net/teumteum/controller/QaController.java diff --git a/src/main/java/net/teumteum/controller/QaController.java b/src/main/java/net/teumteum/controller/QaController.java new file mode 100644 index 0000000..6e6004f --- /dev/null +++ b/src/main/java/net/teumteum/controller/QaController.java @@ -0,0 +1,24 @@ +package net.teumteum.controller; + +import lombok.RequiredArgsConstructor; +import net.teumteum.meeting.domain.EndMeetingAlerted; +import net.teumteum.meeting.service.MeetingService; +import org.springframework.context.ApplicationEventPublisher; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequiredArgsConstructor +public class QaController { + + private final MeetingService meetingService; + private final ApplicationEventPublisher eventPublisher; + + @GetMapping("/forcereviewalarm") + public void forcereviewalarm(@RequestParam("meetingId") Long meetingId, + @RequestParam("userId") Long userId) { + var meeting = meetingService.getMeetingById(meetingId, userId); + eventPublisher.publishEvent(new EndMeetingAlerted(meeting.id(), meeting.title(), meeting.participantIds())); + } +}