[Update] add new func
This commit is contained in:
parent
d0fd48667d
commit
0c704b80a9
|
@ -10,4 +10,6 @@ const (
|
||||||
|
|
||||||
SubjectRequestNatsAddLogs = "authentication.request.logs.create"
|
SubjectRequestNatsAddLogs = "authentication.request.logs.create"
|
||||||
SubjectRequestNatsLogsGetList = "authentication.request.logs.list"
|
SubjectRequestNatsLogsGetList = "authentication.request.logs.list"
|
||||||
|
|
||||||
|
SubjectRequestNatsGetTokenWithPhone = "authentication.request.staff.get_token"
|
||||||
)
|
)
|
||||||
|
|
|
@ -38,3 +38,8 @@ func (Request) SaveLog(payload Log) (*Response, error) {
|
||||||
func (Request) GetListLogs(payload *CommonQuery) (*Response, error) {
|
func (Request) GetListLogs(payload *CommonQuery) (*Response, error) {
|
||||||
return requestNats(SubjectRequestNatsLogsGetList, toBytes(payload))
|
return requestNats(SubjectRequestNatsLogsGetList, toBytes(payload))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetTokenWithPhoneNumber ...
|
||||||
|
func (Request) GetTokenWithPhoneNumber(payload *GetTokenByPhoneBody) (*Response, error) {
|
||||||
|
return requestNats(SubjectRequestNatsGetTokenWithPhone, toBytes(payload))
|
||||||
|
}
|
||||||
|
|
|
@ -14,6 +14,11 @@ type CommonQuery struct {
|
||||||
StaffID string `json:"staffID"`
|
StaffID string `json:"staffID"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetTokenByPhoneBody ...
|
||||||
|
type GetTokenByPhoneBody struct {
|
||||||
|
Phone string `json:"phone"`
|
||||||
|
}
|
||||||
|
|
||||||
// Log ...
|
// Log ...
|
||||||
type Log struct {
|
type Log struct {
|
||||||
Reference string `json:"reference"`
|
Reference string `json:"reference"`
|
||||||
|
|
Loading…
Reference in New Issue