<?xml version="1.0"?>
<!--
/**
 * Magezon
 *
 * This source file is subject to the Magezon Software License, which is available at https://www.magezon.com/license.
 * Do not edit or add to this file if you wish to upgrade the to newer versions in the future.
 * If you wish to customize this module for your needs.
 * Please refer to https://www.magezon.com for more information.
 *
 * @category  Magezon
 * @package   Magezon_Core
 * @copyright Copyright (C) 2019 Magezon (https://www.magezon.com)
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="admin">
        <route id="mgzcore" frontName="mgzcore">
            <module name="Magezon_Core" before="Magezon_Core" />
        </route>
        <!-- The batch endpoint the editor's core-data reaches through
             `__experimentalBatch`. ReactAPP's magentoRouteConverter middleware
             rewrites the WordPress path `/batch/v1` to `/magezon/batch` (see
             packages/api-fetch/src/middlewares/magentoRouteConverter.ts), so the
             frontName has to be `magezon` — NOT `mgzcore`. Without this route the
             rewrite landed on a frontName no module declared and every batched
             delete / trash / restore 404'd silently, which is exactly how the
             File Manager's multi-select actions failed. -->
        <route id="magezon" frontName="magezon">
            <module name="Magezon_Core" />
        </route>
    </router>
</config>
