update calendar settings

main
alex 2024-02-11 10:32:22 +01:00
parent 981cb9757d
commit 7c1d3f9ca2
1 changed files with 17 additions and 0 deletions

View File

@ -195,6 +195,23 @@ export async function UpdatePersonalCalendarSettings(
return res.status(401).send({ err: "unauthorized" }); 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 // update user
await User.update( await User.update(