feat: colum stock in product
This commit is contained in:
@@ -2,6 +2,7 @@ package product
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"furtuna-be/internal/common/logger"
|
||||
"furtuna-be/internal/common/mycontext"
|
||||
"furtuna-be/internal/entity"
|
||||
@@ -62,6 +63,7 @@ func (s *ProductService) GetByID(ctx context.Context, id int64) (*entity.Product
|
||||
|
||||
func (s *ProductService) GetAll(ctx context.Context, search entity.ProductSearch) ([]*entity.Product, int, error) {
|
||||
products, total, err := s.repo.GetAllProducts(ctx, search)
|
||||
fmt.Println(products, "tes")
|
||||
if err != nil {
|
||||
logger.ContextLogger(ctx).Error("error when get all products", zap.Error(err))
|
||||
return nil, 0, err
|
||||
|
||||
Reference in New Issue
Block a user