first commit
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"xiawan/wx/api/service"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// GetProxyMappingList 获取代理映射列表
|
||||
func GetProxyMappingList(ctx *gin.Context) {
|
||||
list, err := service.GetProxyMappingList()
|
||||
if err != nil {
|
||||
ctx.JSON(http.StatusInternalServerError, gin.H{
|
||||
"code": -1,
|
||||
"msg": err.Error(),
|
||||
"data": nil,
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
ctx.JSON(http.StatusOK, gin.H{
|
||||
"code": 0,
|
||||
"msg": "success",
|
||||
"data": list,
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user