完善功能
This commit is contained in:
@ -11,6 +11,6 @@ import (
|
||||
)
|
||||
|
||||
type IAdminV1 interface {
|
||||
AdminInfo(ctx context.Context, req *v1.AdminInfoReq) (res *v1.AdminInfoRes, err error)
|
||||
AdminEditPass(ctx context.Context, req *v1.AdminEditPassReq) (res *v1.AdminEditPassRes, err error)
|
||||
Info(ctx context.Context, req *v1.InfoReq) (res *v1.InfoRes, err error)
|
||||
EditPass(ctx context.Context, req *v1.EditPassReq) (res *v1.EditPassRes, err error)
|
||||
}
|
||||
|
||||
@ -4,21 +4,21 @@ import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
type AdminInfoReq struct {
|
||||
g.Meta `path:"/admin/info" tags:"Admin" method:"get" summary:"管理员信息"`
|
||||
type InfoReq struct {
|
||||
g.Meta `path:"/admin/info" tags:"Backend/Admin" method:"get" summary:"管理员信息"`
|
||||
}
|
||||
type AdminInfoRes struct {
|
||||
type InfoRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
AdminId int64 `json:"adminId"`
|
||||
Username string `json:"username"`
|
||||
}
|
||||
|
||||
type AdminEditPassReq struct {
|
||||
g.Meta `path:"/admin/editPass" tags:"Admin" method:"post" summary:"修改密码"`
|
||||
type EditPassReq struct {
|
||||
g.Meta `path:"/admin/editPass" tags:"Backend/Admin" method:"post" summary:"修改密码"`
|
||||
OldPass string `json:"oldPass" v:"required" dc:"旧密码"`
|
||||
NewPass string `json:"newPass" v:"required" dc:"新密码"`
|
||||
}
|
||||
type AdminEditPassRes struct {
|
||||
type EditPassRes struct {
|
||||
g.Meta `mime:"application/json"`
|
||||
Success bool
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user