🐛 Fix user id need isn't pointer in stream request
This commit is contained in:
parent
d19b5ab84f
commit
eb77ecbeb7
@ -2,6 +2,7 @@ package services
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"github.com/samber/lo"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.solsynth.dev/hydrogen/dealer/pkg/proto"
|
"git.solsynth.dev/hydrogen/dealer/pkg/proto"
|
||||||
@ -15,7 +16,7 @@ func PushCommand(userId uint, task models.UnifiedCommand) {
|
|||||||
|
|
||||||
pc := gap.H.GetDealerGrpcConn()
|
pc := gap.H.GetDealerGrpcConn()
|
||||||
_, _ = proto.NewStreamControllerClient(pc).PushStream(ctx, &proto.PushStreamRequest{
|
_, _ = proto.NewStreamControllerClient(pc).PushStream(ctx, &proto.PushStreamRequest{
|
||||||
UserId: uint64(userId),
|
UserId: lo.ToPtr(uint64(userId)),
|
||||||
Body: task.Marshal(),
|
Body: task.Marshal(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user