瀏覽代碼

添加防范

yjp 1 年之前
父節點
當前提交
a49124dfa1
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      http_binding/response/response.go

+ 4 - 0
http_binding/response/response.go

@@ -81,6 +81,10 @@ func SendMapResponse(c *binding_context.Context, statusCode int, data map[string
 	c.JSON(statusCode, msgRespMap)
 }
 
+func SendRawMapResponse(c *binding_context.Context, statusCode int, data map[string]any, err error) {
+	c.JSON(statusCode, data)
+}
+
 type MsgResponse struct {
 	Success bool   `json:"success"`
 	ErrCode int    `json:"errCode"`