@admin_bp.route('/setting/basic/<path:setting>/toggle', methods=['POST'])
@login_required
@operator_role_required
def setting_basic_toggle(setting):
    result = Setting().toggle(setting)
    if result:
        return make_response(jsonify({'status': 'ok', 'msg': 'Toggled setting successfully.'}), 200)
    else:
        return make_response(jsonify({'status': 'error', 'msg': 'Unable to toggle setting.'}), 500)
@admin_bp.route('/setting/basic/<path:setting>/toggle', methods=['POST'])
@login_required
@operator_role_required
def setting_basic_toggle(setting):
    result = Setting().toggle(setting)
    if result:
        return make_response(jsonify({'status': 'ok', 'msg': 'Toggled setting successfully.'}), 200)
    else:
        return make_response(jsonify({'status': 'error', 'msg': 'Unable to toggle setting.'}), 500)