Ignore:
Timestamp:
01/03/24 00:00:07 (11 months ago)
Author:
gjoko kostadinov <gjokokostadinov@…>
Branches:
master
Children:
53765dd
Parents:
77205be
Message:

Add all bug fixes.

Location:
src/main/java/edu/gjoko/schedlr/controllers/rest
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/edu/gjoko/schedlr/controllers/rest/BusinessApi.java

    r77205be r1413ee2  
    2727
    2828    @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);
    3132    }
    3233
  • src/main/java/edu/gjoko/schedlr/controllers/rest/CustomerApi.java

    r77205be r1413ee2  
    2424
    2525    @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);
    2829    }
    2930}
Note: See TracChangeset for help on using the changeset viewer.