Slim banner list to id/imagePath and fix slider click navigation.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -137,9 +137,9 @@ func (r repository) GetBanners(ctx context.Context, limit, page int) (users.Data
|
||||
}
|
||||
defer rows.Close()
|
||||
|
||||
bs := []users.BannerDTO{}
|
||||
bs := []users.BannerListItemDTO{}
|
||||
for rows.Next() {
|
||||
var b users.BannerDTO
|
||||
var b users.BannerListItemDTO
|
||||
errB := rows.Scan(&b.Id, &b.Image)
|
||||
if errB != nil {
|
||||
r.logger.Error("errB :::", errB)
|
||||
|
||||
@@ -37,8 +37,13 @@ type SubCategoryDTO struct {
|
||||
}
|
||||
|
||||
type DataBannerDTO struct {
|
||||
Banners []BannerDTO `json:"banners"`
|
||||
Count int `json:"count"`
|
||||
Banners []BannerListItemDTO `json:"banners"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
type BannerListItemDTO struct {
|
||||
Id int `json:"id"`
|
||||
Image string `json:"imagePath"`
|
||||
}
|
||||
|
||||
type BannerDTO struct {
|
||||
|
||||
Reference in New Issue
Block a user