{"action":"opened","issue":{"url":"https://api.github.com/repos/Discutea/DForumBundle/issues/26","repository_url":"https://api.github.com/repos/Discutea/DForumBundle","labels_url":"https://api.github.com/repos/Discutea/DForumBundle/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/Discutea/DForumBundle/issues/26/comments","events_url":"https://api.github.com/repos/Discutea/DForumBundle/issues/26/events","html_url":"https://github.com/Discutea/DForumBundle/issues/26","id":234352457,"number":26,"title":"Add reputation to users","user":{"login":"OriolLlovera","id":22749567,"avatar_url":"https://avatars1.githubusercontent.com/u/22749567?v=3","gravatar_id":"","url":"https://api.github.com/users/OriolLlovera","html_url":"https://github.com/OriolLlovera","followers_url":"https://api.github.com/users/OriolLlovera/followers","following_url":"https://api.github.com/users/OriolLlovera/following{/other_user}","gists_url":"https://api.github.com/users/OriolLlovera/gists{/gist_id}","starred_url":"https://api.github.com/users/OriolLlovera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OriolLlovera/subscriptions","organizations_url":"https://api.github.com/users/OriolLlovera/orgs","repos_url":"https://api.github.com/users/OriolLlovera/repos","events_url":"https://api.github.com/users/OriolLlovera/events{/privacy}","received_events_url":"https://api.github.com/users/OriolLlovera/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-07T21:45:11Z","updated_at":"2017-06-07T21:45:11Z","closed_at":null,"body":"I add a reputation field on my fos_user table and I'm trying to implement this system on posts to vote users. I create a function on PostController that works fine if I check the database but the redirect didn't work.\r\n\r\n`public function puntuacioAction(Request $request){\r\n\r\n        $em = $this->getDoctrine()->getManager();\r\n\r\n        $idPoster = $request->request->get('id_posterUser');\r\n        $positive= $request->request->get('positive');\r\n        $negative= $request->request->get('negative');\r\n\r\n        $user=  $em->getRepository(User::class)->findOneById($idPoster);\r\n\r\n\r\n        $topic = $em->getRepository(Topic::class)->findOneByUser($user->getId());\r\n\r\n        $puntuacio = $usuari->getReputatio();\r\n\r\n        if ($positive!= null) {\r\n            $puntuacio = $puntuacio + 1;\r\n        }\r\n        if($negative!= null){\r\n             $puntuacio = $puntuacio - 1;\r\n        }\r\n\r\n        $usuari->setReputacio($puntuacio);\r\n        $em->persist($usuari);\r\n        $em->flush();\r\n\r\n       return $this->forward('DForumBundle:Post:post', array('slug' => $topic->getSlug()));\r\n\r\n    }`\r\nCan someone tell me how should be my return? I'm not sure how does annotations routes works so I did it on my own way. "}}
{"actor":{"display_login":"OriolLlovera"}}