2bbf42b741
Remove Agent Desk users, roles, login sessions, tokens, and local permission persistence. Expose the backend as an embeddable ai-agent module with host-provided subject lookup and operation authorization callbacks, and complete the frontend/backend repository split.
20 lines
451 B
Go
20 lines
451 B
Go
package httpx
|
|
|
|
import (
|
|
"code.tczkiot.com/wlw/ai-agent/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")))
|
|
return 0, false
|
|
}
|
|
return value, true
|
|
}
|