add full methods for notifyer worker

This commit is contained in:
Pavel 2024-04-03 19:46:10 +03:00
parent 2acf60b365
commit a0daa858be

@ -2,7 +2,6 @@ package rpc_service
import ( import (
"context" "context"
"fmt"
"penahub.gitlab.yandexcloud.net/backend/quiz/common.git/dal" "penahub.gitlab.yandexcloud.net/backend/quiz/common.git/dal"
"penahub.gitlab.yandexcloud.net/backend/quiz/core.git/proto/notifyer" "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 { if err != nil {
return nil, err return nil, err
} }
return nil, nil resp := &notifyer.GetQuizzesResponse{
QuizIds: ids,
}
return resp, nil
} }
func (m *MailNotify) GetStartedQuizzes(ctx context.Context, in *notifyer.GetStartedQuizzesRequest) (*notifyer.GetStartedQuizzesResponse, error) { func (m *MailNotify) GetStartedQuizzes(ctx context.Context, in *notifyer.GetStartedQuizzesRequest) (*notifyer.GetStartedQuizzesResponse, error) {
fmt.Println(in) ids, err := m.dal.QuizRepo.GetStartedQuizzesID(ctx, in.AccountId)
fmt.Println("AAAAAAAAAAAAAAAAaaa GetStartedQuizzes") if err != nil {
return nil, nil return nil, err
}
resp := &notifyer.GetStartedQuizzesResponse{
QuizIds: ids,
}
return resp, nil
} }