(self)
return jsonify({'objects': sigma_rules, 'meta': meta})
Handles GET request to the resource.

        Returns:
            Dict of sigma rules
Handles GET request to the resource.
Handles GET request to the resource .
def get(self):
        """Handles GET request to the resource.

        Returns:
            Dict of sigma rules
        """
        sigma_rules = []

        try:
            sigma_rules = ts_sigma_lib.get_all_sigma_rules()

        except ValueError as e:
            logger.error('OS Error, unable to get the path to the Sigma rules',
                         exc_info=True)
            abort(
                HTTP_STATUS_CODE_NOT_FOUND,
                f'Value Error, {e}')
        # TODO: idea for meta: add a list of folders that have been parsed
        meta = {'current_user': current_user.username,
                'rules_count': len(sigma_rules)}
        return jsonify({'objects': sigma_rules, 'meta': meta})
def get ( self ) : sigma_rules = [ ] try : sigma_rules = ts_sigma_lib . get_all_sigma_rules ( ) except ValueError as e : logger . error ( 'OS Error, unable to get the path to the Sigma rules' , exc_info = True ) abort ( HTTP_STATUS_CODE_NOT_FOUND , f'Value Error, {e}' ) # TODO: idea for meta: add a list of folders that have been parsed meta = { 'current_user' : current_user . username , 'rules_count' : len ( sigma_rules ) } return jsonify ( { 'objects' : sigma_rules , 'meta' : meta } )