add products

This commit is contained in:
2024-05-18 12:58:50 +07:00
parent afd5536246
commit 6b3306bb96
8 changed files with 389 additions and 31 deletions
+8
View File
@@ -32,3 +32,11 @@ func (s *Server) GetPositions(ctx context.Context, req *crm.GetPositionsReq) (*c
}
return &crm.PositionsRsp{Products: products}, nil
}
func (s *Server) GetProduct(ctx context.Context, req *crm.GetProductReq) (*crm.ProductRsp, error) {
product, err := s.storage.GetProduct(ctx, req.Id)
if err != nil {
return nil, err
}
return &crm.ProductRsp{Product: product}, nil
}