规范化UI JS CONFIG
This commit is contained in:
@@ -270,14 +270,14 @@ func formatTimeValue(value *time.Time) string {
|
||||
|
||||
func getFetchParams(c *gin.Context) map[string]string {
|
||||
params := make(map[string]string)
|
||||
|
||||
|
||||
// 1. Get from Query parameters
|
||||
for k, v := range c.Request.URL.Query() {
|
||||
if len(v) > 0 {
|
||||
params[k] = v[0]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 2. Override with JSON body if applicable (for POST)
|
||||
if c.Request.Method == http.MethodPost {
|
||||
var body map[string]any
|
||||
@@ -288,6 +288,6 @@ func getFetchParams(c *gin.Context) map[string]string {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return params
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user