fix: update DoubleRotate to match new signature with all parameters
Build and Deploy / build (push) Successful in 2m43s
Build and Deploy / deploy (push) Has been skipped

This commit is contained in:
2026-07-16 22:54:03 +00:00
parent 28998964ef
commit ad6a130a6f
2 changed files with 17 additions and 4 deletions
+10 -2
View File
@@ -227,13 +227,21 @@ func (h *CaptchaHandler) DoubleRotate(c *gin.Context) {
return
}
angle, err := h.handler.DoubleRotate(req.InsideBase64, req.OutsideBase64)
result, err := h.handler.DoubleRotate(
req.InsideBase64,
req.OutsideBase64,
req.CheckPixel,
req.SpeedRatio,
req.Grayscale,
req.Anticlockwise,
req.CutPixelValue,
)
if err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
return
}
c.JSON(http.StatusOK, model.CaptchaResult{Result: angle})
c.JSON(http.StatusOK, model.CaptchaResult{Result: result.Angle})
}
// 图标检测
+7 -2
View File
@@ -67,8 +67,13 @@ type RotateRequest struct {
}
type DoubleRotateRequest struct {
InsideBase64 string `json:"inside_base64" binding:"required"`
OutsideBase64 string `json:"outside_base64" binding:"required"`
InsideBase64 string `json:"inside_base64" binding:"required"`
OutsideBase64 string `json:"outside_base64" binding:"required"`
CheckPixel int `json:"check_pixel"` // 检查像素,默认0
SpeedRatio float64 `json:"speed_ratio"` // 速度比例,默认0
Grayscale bool `json:"grayscale"` // 灰度处理
Anticlockwise bool `json:"anticlockwise"` // 逆时针旋转
CutPixelValue int `json:"cut_pixel_value"` // 割像素值,默认0
}
type DetectIconRequest struct {