def get(self, user_id):
        """
        View list of users or details of a single user

        Arguments
        ---------
        user_id: uuid/None
            User's ID to view details (if None show all)
        """
        if user_id:
            result = {}
            try:
                user = User.query.filter_by(id=user_id).first()
                result['user_id'] = str(user.id)
                result['user'] = user.username
                result['admin'] = user.is_admin
                result['email'] = user.email
            except AttributeError:
                abort(404)
        else:
            result = []
            users = User.query.all()
            for user in users:
                entry = {}
                entry['user_id'] = str(user.id)
                entry['user'] = user.username
                entry['admin'] = user.is_admin
                entry['email'] = user.email
                result.append(entry)
        return jsonify(result), 200

        View list of users or details of a single user

        Arguments
        ---------
        user_id: uuid/None
            User's ID to view details (if None show all)
        
crackq/cq_api.py