Add callback and update user role
This commit is contained in:
@@ -70,6 +70,16 @@ func (s *ProductService) GetAll(ctx context.Context, search entity.ProductSearch
|
||||
return products.ToProductList(), total, nil
|
||||
}
|
||||
|
||||
func (s *ProductService) GetProductPOS(ctx context.Context, search entity.ProductPOS) ([]*entity.Product, error) {
|
||||
products, err := s.repo.GetProductByPartnerIDAndSiteID(ctx, search.PartnerID, search.SiteID)
|
||||
if err != nil {
|
||||
logger.ContextLogger(ctx).Error("error when get all products", zap.Error(err))
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return products.ToProductList(), nil
|
||||
}
|
||||
|
||||
func (s *ProductService) Delete(ctx mycontext.Context, id int64) error {
|
||||
productDB, err := s.repo.GetProductByID(ctx, id)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user