// Code scaffolded by goctl. Safe to edit.
// goctl 1.10.1

package brand

import (
	"net/http"

	"haixun-backend/internal/logic/brand"
	"haixun-backend/internal/response"
	"haixun-backend/internal/svc"
)

func ListBrandsHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
	return func(w http.ResponseWriter, r *http.Request) {
		l := brand.NewListBrandsLogic(r.Context(), svcCtx)
		data, err := l.ListBrands()
		response.Write(r.Context(), w, data, err)
	}
}
