change: server

This commit is contained in:
lilong.129
2025-02-18 20:22:07 +08:00
parent 5d91b69603
commit 7183eae486
10 changed files with 570 additions and 465 deletions

View File

@@ -11,14 +11,14 @@ import (
// exec a single uixt action
func uixtActionHandler(c *gin.Context) {
dExt, err := GetContextDriver(c)
dExt, err := GetDriver(c)
if err != nil {
return
}
var req uixt.MobileAction
if err := c.ShouldBindJSON(&req); err != nil {
handlerValidateRequestFailedContext(c, err)
RenderErrorValidateRequest(c, err)
return
}
@@ -34,20 +34,19 @@ func uixtActionHandler(c *gin.Context) {
c.Abort()
return
}
c.JSON(http.StatusOK, HttpResponse{Code: 0, Message: "success"})
RenderSuccess(c, true)
}
// exec multiple uixt actions
func uixtActionsHandler(c *gin.Context) {
dExt, err := GetContextDriver(c)
dExt, err := GetDriver(c)
if err != nil {
return
}
var actions []uixt.MobileAction
if err := c.ShouldBindJSON(&actions); err != nil {
handlerValidateRequestFailedContext(c, err)
RenderErrorValidateRequest(c, err)
return
}
@@ -65,6 +64,5 @@ func uixtActionsHandler(c *gin.Context) {
return
}
}
c.JSON(http.StatusOK, HttpResponse{Code: 0, Message: "success"})
RenderSuccess(c, true)
}