Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * @Route(path="/microsoft_sync", name="microsoft_sync_excel", options={"expose": true})
- *
- */
- public function syncAction(Request $request)
- {
- $em = $this->getEm();
- /** @var MicrosoftAPIService $microsoftAPIService */
- $microsoftAPIService = $this->get('influencing.service.microsoft');
- /** @var User $user */
- $user = $this->getCurrentUser();
- /** @var Profile $profile */
- $profile = $em->find('InfluencingCoreBundle:Profile', $request->get('profile_id'));
- $microsoftAccountIds = $request->get('onedrive_accounts_ids');
- $fields = $request->get('fields');
- $filename = $request->get('filename');
- $statusOk = $microsoftAPIService->sync($microsoftAccountIds, $fields, $profile, $filename, $user);
- $result = [
- 'success' => $statusOk,
- ];
- return new JsonResponse($result);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement