add show course and map names

This commit is contained in:
Aleksandr Trushkin
2024-01-08 18:31:35 +03:00
parent 48f5d80f7a
commit 2c0564f68c
22 changed files with 166 additions and 90 deletions

View File

@ -11,7 +11,7 @@ import (
"time"
"git.loyso.art/frx/kurious/internal/common/errors"
"git.loyso.art/frx/kurious/pkg/slices"
"git.loyso.art/frx/kurious/internal/common/xslices"
"git.loyso.art/frx/kurious/pkg/xdefault"
"github.com/go-resty/resty/v2"
@ -52,8 +52,8 @@ func NewClient(ctx context.Context, log *slog.Logger, debug bool) (c *client, er
return nil, err
}
getQuerySet := func(fields []field) querySet {
items := slices.Map(fields, func(f field) string {
getQuerySet := func(fields []Field) querySet {
items := xslices.Map(fields, func(f Field) string {
return f.Value
})

View File

@ -39,7 +39,7 @@ type ReduxMetadata struct {
} `json:"data"`
}
type field struct {
type Field struct {
Name string `json:"name"`
Value string `json:"value"`
}
@ -51,7 +51,7 @@ type ReduxDictionaryContainer struct {
UserID string `json:"userId"`
Created time.Time `json:"created"`
Updated time.Time `json:"updated"`
Fields []field `json:"fields"`
Fields []Field `json:"fields"`
}
type ReduxDictionaries struct {