diff --git a/rpc_service/mail_notify.go b/rpc_service/mail_notify.go index a4b632c..ebdbec6 100644 --- a/rpc_service/mail_notify.go +++ b/rpc_service/mail_notify.go @@ -2,7 +2,6 @@ package rpc_service import ( "context" - "fmt" "penahub.gitlab.yandexcloud.net/backend/quiz/common.git/dal" "penahub.gitlab.yandexcloud.net/backend/quiz/core.git/proto/notifyer" ) @@ -23,11 +22,19 @@ func (m *MailNotify) GetQuizzes(ctx context.Context, in *notifyer.GetQuizzesRequ if err != nil { return nil, err } - return nil, nil + resp := ¬ifyer.GetQuizzesResponse{ + QuizIds: ids, + } + return resp, nil } func (m *MailNotify) GetStartedQuizzes(ctx context.Context, in *notifyer.GetStartedQuizzesRequest) (*notifyer.GetStartedQuizzesResponse, error) { - fmt.Println(in) - fmt.Println("AAAAAAAAAAAAAAAAaaa GetStartedQuizzes") - return nil, nil + ids, err := m.dal.QuizRepo.GetStartedQuizzesID(ctx, in.AccountId) + if err != nil { + return nil, err + } + resp := ¬ifyer.GetStartedQuizzesResponse{ + QuizIds: ids, + } + return resp, nil }