[Update] Add request verify code
This commit is contained in:
parent
75c468a06d
commit
d780aa9094
|
@ -6,6 +6,7 @@ const (
|
||||||
SubjectRequestNatsCheckPermission = "authentication.request.staff.check_permission"
|
SubjectRequestNatsCheckPermission = "authentication.request.staff.check_permission"
|
||||||
SubjectRequestNatsGetPermission = "authentication.request.staff.list_permission"
|
SubjectRequestNatsGetPermission = "authentication.request.staff.list_permission"
|
||||||
SubjectRequestNatsSyncStaff = "authentication.request.staff.sync_data"
|
SubjectRequestNatsSyncStaff = "authentication.request.staff.sync_data"
|
||||||
|
SubjectRequestNatsVerifyCode = "authentication.request.staff.verify_code"
|
||||||
|
|
||||||
SubjectRequestNatsStaffCreate = "authentication.request.staff.create"
|
SubjectRequestNatsStaffCreate = "authentication.request.staff.create"
|
||||||
SubjectRequestNatsStaffUpdate = "authentication.request.staff.update"
|
SubjectRequestNatsStaffUpdate = "authentication.request.staff.update"
|
||||||
|
|
|
@ -9,6 +9,11 @@ func (Request) CheckPermission(payload StaffCheckPermissionBody) (*Response, err
|
||||||
return requestNats(SubjectRequestNatsCheckPermission, toBytes(payload))
|
return requestNats(SubjectRequestNatsCheckPermission, toBytes(payload))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// VerifyCode ...
|
||||||
|
func (Request) VerifyCode(payload StaffVerifyCodeBody) (*Response, error) {
|
||||||
|
return requestNats(SubjectRequestNatsVerifyCode, toBytes(payload))
|
||||||
|
}
|
||||||
|
|
||||||
// GetPermission ...
|
// GetPermission ...
|
||||||
func (Request) GetPermission(payload StaffGetPermissions) (*Response, error) {
|
func (Request) GetPermission(payload StaffGetPermissions) (*Response, error) {
|
||||||
return requestNats(SubjectRequestNatsGetPermission, toBytes(payload))
|
return requestNats(SubjectRequestNatsGetPermission, toBytes(payload))
|
||||||
|
|
|
@ -5,6 +5,13 @@ import (
|
||||||
"go.mongodb.org/mongo-driver/bson"
|
"go.mongodb.org/mongo-driver/bson"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// StaffVerifyCodeBody ...
|
||||||
|
type StaffVerifyCodeBody struct {
|
||||||
|
Code string `json:"code"`
|
||||||
|
StaffID string `json:"staffId"`
|
||||||
|
Source string `json:"source"`
|
||||||
|
}
|
||||||
|
|
||||||
// CommonQuery ...
|
// CommonQuery ...
|
||||||
type CommonQuery struct {
|
type CommonQuery struct {
|
||||||
Page int64 `json:"page"`
|
Page int64 `json:"page"`
|
||||||
|
|
Loading…
Reference in New Issue