🐛 Fix user id need isn't pointer in stream request

This commit is contained in:
LittleSheep 2024-08-23 19:36:11 +08:00
parent d19b5ab84f
commit eb77ecbeb7

View File

@ -2,6 +2,7 @@ package services
import (
"context"
"github.com/samber/lo"
"time"
"git.solsynth.dev/hydrogen/dealer/pkg/proto"
@ -15,7 +16,7 @@ func PushCommand(userId uint, task models.UnifiedCommand) {
pc := gap.H.GetDealerGrpcConn()
_, _ = proto.NewStreamControllerClient(pc).PushStream(ctx, &proto.PushStreamRequest{
UserId: uint64(userId),
UserId: lo.ToPtr(uint64(userId)),
Body: task.Marshal(),
})
}