Localize client API responses by lang query param.
Client endpoints now return a single-language string (default tm) so the frontend can pass ?lang= and skip picking from nested tm/ru/en objects. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -3,18 +3,18 @@ package users
|
||||
import "context"
|
||||
|
||||
type Repository interface {
|
||||
GetNews(ctx context.Context, limit, page int) (DataNewsDTO, error)
|
||||
GetNewsById(ctx context.Context, id int) (NewsDTO, error)
|
||||
GetNews(ctx context.Context, limit, page int, lang string) (DataNewsDTO, error)
|
||||
GetNewsById(ctx context.Context, id int, lang string) (NewsDTO, error)
|
||||
|
||||
GetCategories(ctx context.Context) ([]CategoryDTO, error)
|
||||
GetSubCategoryById(ctx context.Context, id int) (SubCategoryDTO, error)
|
||||
GetCategories(ctx context.Context, lang string) ([]CategoryDTO, error)
|
||||
GetSubCategoryById(ctx context.Context, id int, lang string) (SubCategoryDTO, error)
|
||||
|
||||
GetBanners(ctx context.Context, limit, page int) (DataBannerDTO, error)
|
||||
GetBannerById(ctx context.Context, id int) (BannerDTO, error)
|
||||
GetBannerById(ctx context.Context, id int, lang string) (BannerDTO, error)
|
||||
|
||||
GetStatics(ctx context.Context, limit, page int) (DataStaticDTO, error)
|
||||
GetStaticById(ctx context.Context, id int) (StaticDTO, error)
|
||||
GetStatics(ctx context.Context, limit, page int, lang string) (DataStaticDTO, error)
|
||||
GetStaticById(ctx context.Context, id int, lang string) (StaticDTO, error)
|
||||
|
||||
GetCurrency(ctx context.Context) (CurrencyDTO, error)
|
||||
GetCurrency(ctx context.Context, lang string) (CurrencyDTO, error)
|
||||
GetSetting(ctx context.Context) (SettingDTO, error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user