Commit dc081cfdd26f98fa4d86e65a2248be3a85db71f0
1 parent
9ce816e2
fix(im): 简化 LiveKit webhook 的 @PostMapping 注解(移除冗余 consumes)因为 LiveKit webhook 是 webhook/json 非标
Showing
1 changed file
with
2 additions
and
3 deletions
yudao-module-im/src/main/java/cn/iocoder/yudao/module/im/controller/admin/rtc/ImRtcLiveKitController.java
| @@ -5,15 +5,14 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult; | @@ -5,15 +5,14 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult; | ||
| 5 | import cn.iocoder.yudao.framework.common.util.json.JsonUtils; | 5 | import cn.iocoder.yudao.framework.common.util.json.JsonUtils; |
| 6 | import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore; | 6 | import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore; |
| 7 | import cn.iocoder.yudao.module.im.framework.rtc.core.LiveKitClient; | 7 | import cn.iocoder.yudao.module.im.framework.rtc.core.LiveKitClient; |
| 8 | -import cn.iocoder.yudao.module.im.service.rtc.ImRtcCallService; | ||
| 9 | import cn.iocoder.yudao.module.im.framework.rtc.core.LiveKitWebhookEventDTO; | 8 | import cn.iocoder.yudao.module.im.framework.rtc.core.LiveKitWebhookEventDTO; |
| 9 | +import cn.iocoder.yudao.module.im.service.rtc.ImRtcCallService; | ||
| 10 | import io.swagger.v3.oas.annotations.Operation; | 10 | import io.swagger.v3.oas.annotations.Operation; |
| 11 | import io.swagger.v3.oas.annotations.tags.Tag; | 11 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 12 | import jakarta.annotation.Resource; | 12 | import jakarta.annotation.Resource; |
| 13 | import jakarta.annotation.security.PermitAll; | 13 | import jakarta.annotation.security.PermitAll; |
| 14 | import jakarta.servlet.http.HttpServletRequest; | 14 | import jakarta.servlet.http.HttpServletRequest; |
| 15 | import lombok.extern.slf4j.Slf4j; | 15 | import lombok.extern.slf4j.Slf4j; |
| 16 | -import org.springframework.http.MediaType; | ||
| 17 | import org.springframework.web.bind.annotation.PostMapping; | 16 | import org.springframework.web.bind.annotation.PostMapping; |
| 18 | import org.springframework.web.bind.annotation.RequestBody; | 17 | import org.springframework.web.bind.annotation.RequestBody; |
| 19 | import org.springframework.web.bind.annotation.RequestMapping; | 18 | import org.springframework.web.bind.annotation.RequestMapping; |
| @@ -46,7 +45,7 @@ public class ImRtcLiveKitController { | @@ -46,7 +45,7 @@ public class ImRtcLiveKitController { | ||
| 46 | * @param rawBody 原始 JSON body;签名校验需要原始字节 | 45 | * @param rawBody 原始 JSON body;签名校验需要原始字节 |
| 47 | * @return 是否处理成功;伪造 / 非法事件返回 false | 46 | * @return 是否处理成功;伪造 / 非法事件返回 false |
| 48 | */ | 47 | */ |
| 49 | - @PostMapping(value = "/webhook", consumes = MediaType.APPLICATION_JSON_VALUE) | 48 | + @PostMapping("/webhook") |
| 50 | @Operation(summary = "LiveKit Webhook 回调;接收成员离开 / 房间结束等事件做业务态兜底清理") | 49 | @Operation(summary = "LiveKit Webhook 回调;接收成员离开 / 房间结束等事件做业务态兜底清理") |
| 51 | @PermitAll | 50 | @PermitAll |
| 52 | @TenantIgnore | 51 | @TenantIgnore |