diff --git a/src/controllers/calendarController.ts b/src/controllers/calendarController.ts index b1c9bc1..3c1b370 100644 --- a/src/controllers/calendarController.ts +++ b/src/controllers/calendarController.ts @@ -195,6 +195,23 @@ export async function UpdatePersonalCalendarSettings( return res.status(401).send({ err: "unauthorized" }); } + // request to termin planner to update the settings + + const user = await User.findOne({ + where: { + user_id: userSession.user_id, + }, + attributes: ["store_id"], + }); + + if (!user) { + return res.status(401).send({ err: "unauthorized" }); + } + + terminPlanerRequest("/api/v1/changedSettings", "POST", { + storeId: user.store_id, + }); + // update user await User.update(