generated from VLADIMIR/template
add time
This commit is contained in:
@@ -41,11 +41,15 @@ func (s *Services) GiveApplications(ctx context.Context, req *proto.GiveApplicat
|
||||
}
|
||||
|
||||
func (s *Services) GetGame(ctx context.Context, _ *proto.GetGameReq) (*proto.GetGameRsp, error) {
|
||||
state, err := s.repository.GetGame(ctx)
|
||||
game, err := s.repository.GetGame(ctx)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, err.Error())
|
||||
}
|
||||
return &proto.GetGameRsp{State: state}, nil
|
||||
return &proto.GetGameRsp{
|
||||
State: game.State,
|
||||
StartAt: game.StartTime,
|
||||
EndAt: game.EndTime,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (s *Services) GameStart(ctx context.Context, _ *proto.GameStartReq) (*proto.GameStartRsp, error) {
|
||||
|
||||
Reference in New Issue
Block a user