This commit is contained in:
2025-06-15 01:02:46 +07:00
parent 36aaa49273
commit b17599eb39
10 changed files with 83 additions and 36 deletions
+6 -2
View File
@@ -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) {