add sqlite support

This commit is contained in:
Aleksandr Trushkin
2024-03-12 14:44:22 +03:00
parent 97986063df
commit 938d3cd307
25 changed files with 1105 additions and 118 deletions

View File

@ -136,11 +136,14 @@ func (a *listProductsAction) parse(args []string, options map[string]string) err
func (a *listProductsAction) handle() error {
params := sravni.ListEducationProductsParams{
LearningType: a.params.learningType,
CoursesThematics: []string{a.params.courseThematic},
Limit: a.params.limit,
Offset: a.params.offset,
LearningType: a.params.learningType,
Limit: a.params.limit,
Offset: a.params.offset,
}
if a.params.courseThematic != "" {
params.CoursesThematics = append(params.CoursesThematics, a.params.courseThematic)
}
result, err := a.client.ListEducationalProducts(a.ctx, params)
if err != nil {
return fmt.Errorf("listing education products: %w", err)