rm delete calendars because not having enough permission to delete the calendar on google

main
alex 2024-01-21 19:35:50 +01:00
parent afe5f7b18d
commit c3a34d09fd
1 changed files with 2 additions and 3 deletions

View File

@ -239,11 +239,11 @@ export async function UpdateStoreCalendarSettings(req: Request, res: Response) {
export async function UnlinkGoogleCalendar(req: Request, res: Response) {
try {
const { password, deleteCalendars } = req.body;
const { password } = req.body;
// validate request
if (!password || deleteCalendars === undefined) {
if (!password) {
return res.status(400).send({ err: "invalid request" });
}
@ -302,7 +302,6 @@ export async function UnlinkGoogleCalendar(req: Request, res: Response) {
axios
.post(`${process.env.TERMIN_PLANNER_URL}/removeGoogleAccount` as string, {
userId: userSession.user_id,
deleteCalendars: deleteCalendars,
pass: process.env.TERMIN_PLANNER_AUTHORIZATION_PASSWORD as string,
})
.then(() => res.status(200).send({ msg: "success" }))