/** * @Route("/notify") * @Method({"POST"}) */ public function notify(Request $request) { $email = $request->request->get('email'); if (!empty($email)) { return $this->service->notify($email); } return ['error' => true, 'errorType' => 'nouser']; }