def put(self, user_id):
        """
        Toggle admin privs for selected user

        Arguments
        ---------
        user_id: 1
            User ID to make admin

        Returns
        -------
        result: boolean
            Function success or failure
        """
        user = User.query.filter_by(id=user_id).first()
        if isinstance(user, User):
            user.is_admin = not user.is_admin
            db.session.commit()
            return 'OK', 200
        return 404

        Toggle admin privs for selected user

        Arguments
        ---------
        user_id: 1
            User ID to make admin

        Returns
        -------
        result: boolean
            Function success or failure
        
crackq/cq_api.py