Ignore:
Timestamp:
05/24/23 23:18:47 (18 months ago)
Author:
Gjoko Kostadinov <gjoko.kostadinov@…>
Branches:
master
Children:
77205be
Parents:
8bcd64c
Message:

Periodic update

File:
1 edited

Legend:

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

    r8bcd64c r950fa0d  
    22
    33import edu.gjoko.schedlr.entity.Business;
     4import edu.gjoko.schedlr.entity.BusinessType;
    45import edu.gjoko.schedlr.services.BusinessService;
    56import lombok.AllArgsConstructor;
    6 import org.springframework.security.core.Authentication;
    7 import org.springframework.security.core.context.SecurityContextHolder;
    87import org.springframework.web.bind.annotation.*;
    98
     
    3837        return businessService.findByOwner(businessOwnerId);
    3938    }
     39
     40    @GetMapping(path = "/{businessTypeId}")
     41    public List<Business> getBusinessesByBusinessType(@PathVariable("businessTypeId") Long id) {
     42        BusinessType businessType = new BusinessType();
     43        businessType.setId(id);
     44        return businessService.findByBusinessTypeAndActiveStatus(businessType);
     45    }
    4046}
Note: See TracChangeset for help on using the changeset viewer.