Ignore:
Timestamp:
09/21/22 18:46:15 (2 years ago)
Author:
Marko <Marko@…>
Branches:
master
Children:
d66b8eb
Parents:
7e88e46
Message:

Admin and specifications controllers added

Location:
phonelux-backend/src/main/java/finki/it/phoneluxbackend/controllers
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • phonelux-backend/src/main/java/finki/it/phoneluxbackend/controllers/PhoneOfferController.java

    r7e88e46 r5201690  
    77import lombok.AllArgsConstructor;
    88import org.springframework.beans.factory.annotation.Autowired;
    9 import org.springframework.web.bind.annotation.GetMapping;
    10 import org.springframework.web.bind.annotation.PathVariable;
    11 import org.springframework.web.bind.annotation.RequestMapping;
    12 import org.springframework.web.bind.annotation.RestController;
     9import org.springframework.web.bind.annotation.*;
    1310
    1411import java.util.List;
     
    2219    public List<PhoneOffer> getOffersForPhone(@PathVariable("phoneId") Long phoneId){
    2320        return phoneOfferService.getPhoneOffersForPhone(phoneId);
     21    }
     22
     23    @GetMapping(path = "/multipleoffers")
     24    public List<PhoneOffer> getPhoneOffer(@RequestParam("offerIds") String offerIds){
     25        return phoneOfferService.getMultiplePhoneOffers(offerIds);
     26    }
     27
     28    @GetMapping(path = "/phoneoffer/shop/{shop}")
     29    public List<PhoneOffer> getOffersFromShop(@PathVariable("shop") String shop){
     30        return phoneOfferService.getOffersFromShop(shop);
    2431    }
    2532
Note: See TracChangeset for help on using the changeset viewer.