File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
server/src/main/java/csembstu/alamgir/server/service Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -50,8 +50,8 @@ public DemandResponse createDemand(CreateDemandRequest request) {
5050 .setMaxQuantity ((int ) request .getMaxQuantity ())
5151 .setMinQuantity ((int ) request .getMinQuantity ());
5252
53- demandRepository .save (newDemand );
54- return mapToResponseHelper (newDemand );
53+ Demand savedDemand = demandRepository .save (newDemand );
54+ return mapToResponseHelper (savedDemand );
5555
5656 }
5757
@@ -89,7 +89,7 @@ private DemandResponse mapToResponseHelper(Demand newDemand) {
8989
9090 response .setId (newDemand .getId ())
9191 .setLocationId (newDemand .getLocation ().getId ())
92- .setProductId (newDemand .getId ())
92+ .setProductId (newDemand .getProduct (). getId ())
9393 .setDate (newDemand .getDate ())
9494 .setMinQuantity (newDemand .getMinQuantity ())
9595 .setMaxQuantity (newDemand .getMaxQuantity ());
You can’t perform that action at this time.
0 commit comments