101577f163
- Updated import paths in multiple service files to reflect the new agent-desk module. - Added a new configuration file for agent-desk in the Docker setup.
20 lines
437 B
Go
20 lines
437 B
Go
package httpx
|
|
|
|
import (
|
|
"agent-desk/internal/pkg/i18nx"
|
|
"net/http"
|
|
"strconv"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
"github.com/mlogclub/simple/web"
|
|
)
|
|
|
|
func GetPathInt64(ctx *gin.Context, name string) (int64, bool) {
|
|
value, err := strconv.ParseInt(ctx.Param(name), 10, 64)
|
|
if err != nil {
|
|
WriteHttpStatusJSON(ctx, http.StatusBadRequest, web.JsonErrorMsg(i18nx.T(ctx, "error.path.invalid", nil)))
|
|
return 0, false
|
|
}
|
|
return value, true
|
|
}
|