update
This commit is contained in:
parent
95d164da1d
commit
ec91501a44
|
|
@ -30,10 +30,9 @@ type LoginRsp struct {
|
|||
Phone string `json:"phone"`
|
||||
}
|
||||
|
||||
type ChangePasswordReq struct {
|
||||
type UpdateReq struct {
|
||||
Username string `json:"username"`
|
||||
OldPassword string `json:"old_password"`
|
||||
NewPassword string `json:"new_password"`
|
||||
Password string `json:"password"`
|
||||
}
|
||||
|
||||
type StaffUser struct {
|
||||
|
|
@ -93,13 +92,13 @@ func (e *StaffUser) Login(req *LoginReq) (*LoginRsp, error) {
|
|||
return r, nil
|
||||
}
|
||||
|
||||
func (e *StaffUser) ChangePassword(req *ChangePasswordReq) error {
|
||||
func (e *StaffUser) Update(req *UpdateReq) error {
|
||||
var reqBody string
|
||||
|
||||
reqBody = goutil.EncodeJSON(req)
|
||||
|
||||
reqUrl := e.GetBaseUrl() + "/ext/staff/user/password"
|
||||
body, err := goutil.HttpPost(reqUrl, e.GetHeader(), []byte(reqBody))
|
||||
reqUrl := e.GetBaseUrl() + "/ext/staff/user"
|
||||
body, err := goutil.HttpPut(reqUrl, e.GetHeader(), []byte(reqBody))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
22
go.mod
22
go.mod
|
|
@ -3,7 +3,7 @@ module git.u8t.cn/open/gosdk
|
|||
go 1.25.0
|
||||
|
||||
require (
|
||||
git.u8t.cn/open/goutil v0.0.0-20260502004704-85867684a371
|
||||
git.u8t.cn/open/goutil v0.0.0-20260701172715-c0058361ddcc
|
||||
github.com/bradfitz/gomemcache v0.0.0-20250403215159-8d39553ac7cf
|
||||
github.com/eclipse/paho.mqtt.golang v1.5.1
|
||||
github.com/gin-gonic/gin v1.11.0
|
||||
|
|
@ -17,8 +17,8 @@ require (
|
|||
github.com/spf13/cast v1.10.0
|
||||
github.com/tidwall/gjson v1.18.0
|
||||
github.com/wechatpay-apiv3/wechatpay-go v0.2.21
|
||||
golang.org/x/crypto v0.49.0
|
||||
gorm.io/gorm v1.31.1
|
||||
golang.org/x/crypto v0.51.0
|
||||
gorm.io/gorm v1.31.2
|
||||
)
|
||||
|
||||
require (
|
||||
|
|
@ -50,7 +50,7 @@ require (
|
|||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/onsi/ginkgo v1.16.5 // indirect
|
||||
github.com/onsi/gomega v1.39.1 // indirect
|
||||
github.com/onsi/gomega v1.40.0 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
|
||||
github.com/quic-go/qpack v0.5.1 // indirect
|
||||
github.com/quic-go/quic-go v0.54.0 // indirect
|
||||
|
|
@ -61,13 +61,13 @@ require (
|
|||
github.com/ugorji/go/codec v1.3.0 // indirect
|
||||
go.uber.org/mock v0.5.0 // indirect
|
||||
golang.org/x/arch v0.20.0 // indirect
|
||||
golang.org/x/image v0.39.0 // indirect
|
||||
golang.org/x/mod v0.34.0 // indirect
|
||||
golang.org/x/net v0.52.0 // indirect
|
||||
golang.org/x/sync v0.20.0 // indirect
|
||||
golang.org/x/sys v0.43.0 // indirect
|
||||
golang.org/x/text v0.36.0 // indirect
|
||||
golang.org/x/tools v0.43.0 // indirect
|
||||
golang.org/x/image v0.43.0 // indirect
|
||||
golang.org/x/mod v0.36.0 // indirect
|
||||
golang.org/x/net v0.54.0 // indirect
|
||||
golang.org/x/sync v0.21.0 // indirect
|
||||
golang.org/x/sys v0.46.0 // indirect
|
||||
golang.org/x/text v0.38.0 // indirect
|
||||
golang.org/x/tools v0.45.0 // indirect
|
||||
google.golang.org/protobuf v1.36.9 // indirect
|
||||
modernc.org/fileutil v1.0.0 // indirect
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue