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