添加日志

This commit is contained in:
lu7213 committed 2026-10-19 11:06:33 -04:00
1 parent 9c29db1245
commit 13ba3a5fdb
1 file changed
+3 -1
@@ -3,8 +3,9 @@ package com.ruoyi.system.controller;
import com.alibaba.fastjson.JSONObject;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.service.TelegramAuditService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
@Slf4j
@RestController
@RequestMapping("/auth/telegram")
public class TelegramAuditController {
@@ -16,6 +17,7 @@ public class TelegramAuditController {
@PostMapping("/webhook")
public AjaxResult webhook(@RequestHeader(value = "X-Telegram-Bot-Api-Secret-Token", required = false) String secret, @RequestBody JSONObject update) {
log.info("telegram webhook " + update.toJSONString() + " secret = {}",secret);
if (!service.matchesSecret(secret)) return AjaxResult.error("非法请求");
service.handleUpdate(update);
return AjaxResult.success();