// This will work when you set task to 'remove // This will work when you set task to 'remove case 'remove_event': removeNote(); break; case 'publish_event': changeNote(1); break; case 'unpublish_event': changeNote(0); break; ////////////////CALENDAR//////////////////////////////////// ////////////////CALENDAR//////////////////////////////////// case 'add_calendar': case 'edit_calendar': edit_calendar(); break; case 'save_calendar': case 'apply_calendar': save_calendar(); break; case 'remove_calendar': remove_calendar(); remove_calendar_events(); break; case 'publish_calendar': change_calendar(1); break; case 'unpublish_calendar': change_calendar(0); break;
global $check_token_exists; global $decode_body; $app->get('', $check_token_exists, function () { get_calendars(); }); $app->post('', $check_token_exists, $decode_body, function () { create_calendar(); }); $app->group('/:calendar_id', function () use($app) { global $check_token_exists; global $decode_body; $app->get('', $check_token_exists, function ($calendar_id) { get_calendar($calendar_id); }); $app->put('', $check_token_exists, $decode_body, function ($calendar_id) { edit_calendar($calendar_id); }); $app->delete('', $check_token_exists, function ($calendar_id) { delete_calendar($calendar_id); }); $app->group('/members', function () use($app) { global $check_token_exists; global $decode_body; $app->get('', $check_token_exists, function ($calendar_id) { get_members($calendar_id); }); $app->post('', $check_token_exists, $decode_body, function ($calendar_id) { add_member($calendar_id); }); $app->group('/:username', function () use($app) { global $check_token_exists;