Changeset 1413ee2 for src/main/java/edu/gjoko/schedlr/controllers
- Timestamp:
- 01/03/24 00:00:07 (11 months ago)
- Branches:
- master
- Children:
- 53765dd
- Parents:
- 77205be
- Location:
- src/main/java/edu/gjoko/schedlr/controllers
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/edu/gjoko/schedlr/controllers/RegisterController.java
r77205be r1413ee2 3 3 import edu.gjoko.schedlr.entity.Stakeholder; 4 4 import edu.gjoko.schedlr.services.StakeholderService; 5 import org.springframework.beans.factory.annotation.Autowired;6 import org.springframework.http.MediaType;7 5 import org.springframework.stereotype.Controller; 8 6 import org.springframework.ui.Model; -
src/main/java/edu/gjoko/schedlr/controllers/rest/BusinessApi.java
r77205be r1413ee2 27 27 28 28 @PatchMapping 29 public void updateBusinesses(@RequestBody List<Business> businessList) { 30 businessService.updateBusinesses(businessList); 29 public void updateBusinesses(@RequestBody List<Business> businessList, HttpServletRequest request) { 30 Long businessOwnerId = (long) request.getSession(true).getAttribute("stakeholderId"); 31 businessService.updateBusinesses(businessList, businessOwnerId); 31 32 } 32 33 -
src/main/java/edu/gjoko/schedlr/controllers/rest/CustomerApi.java
r77205be r1413ee2 24 24 25 25 @PatchMapping 26 public void updateCustomer(@RequestBody Stakeholder stakeholder) { 27 stakeholderService.saveOrUpdateStakeholder(stakeholder); 26 public void updateCustomer(@RequestBody Stakeholder stakeholder, HttpServletRequest request) { 27 Long customerId = (long) request.getSession(true).getAttribute("stakeholderId"); 28 stakeholderService.saveOrUpdateStakeholder(stakeholder, customerId); 28 29 } 29 30 }
Note:
See TracChangeset
for help on using the changeset viewer.