/** * @Route("/get_admins") * @Method({"GET"}) * * @return array */ public function get_admins() { if (!$this->isAdmin()) { return ['error' => true, 'errorText' => 'accessDenied']; } $users = $this->authorservice->get_all_admins(); return $users; }