Update FoodOfferController.java

This commit is contained in:
Thiloparn 2021-03-25 19:42:18 +01:00 committed by GitHub
parent f9452671bb
commit f2324efb9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -79,7 +79,7 @@ public class FoodOfferController {
Client client = this.clientService.getCurrentclient(); Client client = this.clientService.getCurrentclient();
if(foodOffer.getClient().equals(client)) { if(foodOffer.getClient().equals(client)) {
foodOffer.setType(StatusOffer.active); foodOffer.setType(StatusOffer.active);
foodOffer.setCode("FE-"+foodOfferId); foodOffer.setCode("FO-"+foodOfferId);
this.foodOfferService.saveFoodOffer(foodOffer); this.foodOfferService.saveFoodOffer(foodOffer);
} else { } else {
modelMap.addAttribute("message", "You don't have access to this food offer"); modelMap.addAttribute("message", "You don't have access to this food offer");