mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 10:25:52 +02:00
fix: config list sorter invalid
This commit is contained in:
parent
902aa28746
commit
56e82d9c5a
1 changed files with 3 additions and 3 deletions
|
@ -13,8 +13,8 @@ import (
|
|||
|
||||
func GetConfigs(c *gin.Context) {
|
||||
name := c.Query("name")
|
||||
orderBy := c.Query("order_by")
|
||||
sort := c.DefaultQuery("sort", "desc")
|
||||
sortBy := c.Query("sort_by")
|
||||
order := c.DefaultQuery("order", "desc")
|
||||
dir := c.DefaultQuery("dir", "/")
|
||||
|
||||
configFiles, err := os.ReadDir(nginx.GetConfPath(dir))
|
||||
|
@ -66,7 +66,7 @@ func GetConfigs(c *gin.Context) {
|
|||
})
|
||||
}
|
||||
|
||||
configs = config.Sort(orderBy, sort, configs)
|
||||
configs = config.Sort(sortBy, order, configs)
|
||||
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"data": configs,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue