async fix

main
alex 2024-02-11 14:33:21 +01:00
parent ec89709ad4
commit 87b20cead9
2 changed files with 5 additions and 8 deletions

View File

@ -336,7 +336,7 @@ export async function UpdateStoreCalendarSettings(req: Request, res: Response) {
calendar_min_earliest_booking_time: calendarMinEarliestBookingTime, calendar_min_earliest_booking_time: calendarMinEarliestBookingTime,
}; };
terminPlanerRequestChangeFutureBookingDays(store.store_id); await terminPlanerRequestChangeFutureBookingDays(store.store_id);
} }
if (Object.keys(update).length === 0) { if (Object.keys(update).length === 0) {
@ -347,12 +347,9 @@ export async function UpdateStoreCalendarSettings(req: Request, res: Response) {
where: { where: {
store_id: store.store_id, store_id: store.store_id,
}, },
})
.then(() => res.status(200).send({ msg: "success" }))
.catch((err) => {
logger.error(err);
res.status(500).send({ err: "invalid request" });
}); });
res.status(200).send({ msg: "success" });
} catch (error) { } catch (error) {
logger.error(error); logger.error(error);
res.status(500).send({ err: "invalid request" }); res.status(500).send({ err: "invalid request" });

View File

@ -369,7 +369,7 @@ export async function UpdateEmployee(req: Request, res: Response) {
calendar_min_earliest_booking_time: calendarMinEarliestBookingTime, calendar_min_earliest_booking_time: calendarMinEarliestBookingTime,
}; };
terminPlanerRequestChangeFutureBookingDays(store.store_id); await terminPlanerRequestChangeFutureBookingDays(store.store_id);
} }
if (Object.keys(update).length === 0) { if (Object.keys(update).length === 0) {