public function update() { $auth_user = User::getAuthenticated(); if (!$auth_user) { throw new PermissionException(); } send_json(array('hasUpdates' => Follow::getUpdates($auth_user) ? true : false)); }