order-warning #155

Merged
sinhluu merged 3 commits from order-warning into master 2023-04-14 02:37:55 +00:00
2 changed files with 8 additions and 0 deletions
Showing only changes of commit a432e7fd44 - Show all commits

View File

@ -19,3 +19,9 @@ func (s Socket) EmitSocketEventDataReward(p model.PayloadEmitSocketEvent) error
_, err := natsio.GetServer().Request(subject.Socket.EmitEventReward, toBytes(p)) _, err := natsio.GetServer().Request(subject.Socket.EmitEventReward, toBytes(p))
return err return err
} }
// EmitEventToUser ...
func (s Socket) EmitEventToUser(p model.PayloadEmitSocketEvent) error {
_, err := natsio.GetServer().Request(subject.Socket.EmitEventToUser, toBytes(p))
return err
}

View File

@ -9,6 +9,8 @@ func getSocketValue(val string) string {
// Socket ... // Socket ...
var Socket = struct { var Socket = struct {
EmitEventReward string EmitEventReward string
EmitEventToUser string
}{ }{
EmitEventReward: getSocketValue("emit_event_reward"), EmitEventReward: getSocketValue("emit_event_reward"),
EmitEventToUser: "send_message_to_socket",
} }