Slim banner list to id/imagePath and fix slider click navigation.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-05 15:59:11 +05:00
parent 8d7390894e
commit a04bbb8eae
4 changed files with 19 additions and 10 deletions

View File

@@ -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)

View File

@@ -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 {