build auth sms
This commit is contained in:
parent
77f22993d4
commit
6cade7d133
|
@ -37,14 +37,14 @@ func (s SupplierUser) LoginUser(p model.LoginUserRequest) (*model.LoginUserRespo
|
||||||
return r.Data, nil
|
return r.Data, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s SupplierUser) GetListOwner(p model.GetListOwnerRequest) (*model.GetListOwnerResponse, error) {
|
func (s SupplierUser) GetListUser(p model.GetListUserRequest) (*model.GetListUserResponse, error) {
|
||||||
msg, err := natsio.GetServer().Request(subject.SupplierUser.GetListOwner, toBytes(p))
|
msg, err := natsio.GetServer().Request(subject.SupplierUser.GetListUser, toBytes(p))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
var r struct {
|
var r struct {
|
||||||
Data *model.GetListOwnerResponse `json:"data"`
|
Data *model.GetListUserResponse `json:"data"`
|
||||||
Error string `json:"error"`
|
Error string `json:"error"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,7 +141,7 @@ func (s SupplierUser) UpdateSupplierStaffUsers(p model.UpdateStaffRequest) error
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s SupplierUser) UpdateStatus(p model.UpdateStatusRequest) error {
|
func (s SupplierUser) UpdateStatus(p model.UpdateStatusRequest) error {
|
||||||
msg, err := natsio.GetServer().Request(subject.SupplierUser.UpdateStaff, toBytes(p))
|
msg, err := natsio.GetServer().Request(subject.SupplierUser.UpdateStatus, toBytes(p))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ type LoginUserRequest struct {
|
||||||
IsMobile bool `json:"isMobile"`
|
IsMobile bool `json:"isMobile"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetListOwnerRequest struct {
|
type GetListUserRequest struct {
|
||||||
Page int `json:"page"`
|
Page int `json:"page"`
|
||||||
Limit int `json:"limit"`
|
Limit int `json:"limit"`
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
|
@ -72,5 +72,4 @@ type UpdateStatusRequest struct {
|
||||||
|
|
||||||
type ResetPasswordRequest struct {
|
type ResetPasswordRequest struct {
|
||||||
ID string `json:"_id"`
|
ID string `json:"_id"`
|
||||||
Password string `json:"password"`
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ type LoginUserResponse struct {
|
||||||
SupplierID string `json:"supplierId"`
|
SupplierID string `json:"supplierId"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetListOwnerResponse struct {
|
type GetListUserResponse struct {
|
||||||
SupplierUsers []SupplierUserBrief `json:"supplierUsers"`
|
SupplierUsers []SupplierUserBrief `json:"supplierUsers"`
|
||||||
Total int64 `json:"total"`
|
Total int64 `json:"total"`
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ func getSupplierUserValue(val string) string {
|
||||||
var SupplierUser = struct {
|
var SupplierUser = struct {
|
||||||
// Users
|
// Users
|
||||||
LoginUser string
|
LoginUser string
|
||||||
GetListOwner string
|
GetListUser string
|
||||||
CreateOwner string
|
CreateOwner string
|
||||||
UpdateOwner string
|
UpdateOwner string
|
||||||
CreateStaff string
|
CreateStaff string
|
||||||
|
@ -19,7 +19,7 @@ var SupplierUser = struct {
|
||||||
}{
|
}{
|
||||||
// Users
|
// Users
|
||||||
LoginUser: getSupplierUserValue("login_user"),
|
LoginUser: getSupplierUserValue("login_user"),
|
||||||
GetListOwner: getSupplierUserValue("get_list_owner"),
|
GetListUser: getSupplierUserValue("get_list_user"),
|
||||||
CreateOwner: getSupplierUserValue("create_owner"),
|
CreateOwner: getSupplierUserValue("create_owner"),
|
||||||
UpdateOwner: getSupplierUserValue("update_owner"),
|
UpdateOwner: getSupplierUserValue("update_owner"),
|
||||||
CreateStaff: getSupplierUserValue("create_staff"),
|
CreateStaff: getSupplierUserValue("create_staff"),
|
||||||
|
|
Loading…
Reference in New Issue