server v1.0.10 (fixed updating restaurant)

updating restaurant was overwriting some data
This commit is contained in:
2020-10-05 19:35:00 +02:00
parent 782b404da1
commit 7f9a9f7d6b

View File

@@ -86,11 +86,16 @@ export async function createRestaurant(request, oldRestaurant) {
imgUrl: img, imgUrl: img,
workingHours: request.workingHours, workingHours: request.workingHours,
lunchHours: request.lunchHours, lunchHours: request.lunchHours,
lunchMenu: oldRestaurant.lunchMenu,
categories: oldRestaurant.categories,
description: sanitizer.sanitize.keepUnicode(request.description), description: sanitizer.sanitize.keepUnicode(request.description),
tags: request.tags, tags: request.tags,
links: request.links, links: request.links,
phone: request.phone, phone: request.phone,
hidden: request.hidden, hidden: request.hidden,
subscriptionActive: oldRestaurant.subscriptionActive,
subscriptionDue: oldRestaurant.subscriptionDue,
subscriptionStarted: oldRestaurant.subscriptionStarted,
}); });
return restaurant; return restaurant;
} }