add full methods for notifyer worker
This commit is contained in:
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 := ¬ifyer.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 := ¬ifyer.GetStartedQuizzesResponse{
|
||||||
|
QuizIds: ids,
|
||||||
|
}
|
||||||
|
return resp, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user