<?php

use Opentalent\OtAdmin\Http\ApiController;

// Defines the routes used to trigger the admin actions
// @see https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/BackendRouting/Index.html

return [
    // Create a new organization's website
    'site_create' => [
        'path' => '/otadmin/site/create',
        'target' => ApiController::class . '::createSiteAction',
        'access' => 'public'
    ],
    'site_delete' => [
        'path' => '/otadmin/site/delete',
        'target' => ApiController::class . '::deleteSiteAction',
        'access' => 'public'
    ],
    'site_undelete' => [
        'path' => '/otadmin/site/undelete',
        'target' => ApiController::class . '::undeleteSiteAction',
        'access' => 'public'
    ],
    'site_update' => [
        'path' => '/otadmin/site/update',
        'target' => ApiController::class . '::updateSiteConstantsAction',
        'access' => 'public'
    ],
    'site_clearcache' => [
        'path' => '/otadmin/site/clear-cache',
        'target' => ApiController::class . '::clearSiteCacheAction',
        'access' => 'public'
    ],
    'site_setdomain' => [
        'path' => '/otadmin/site/set-domain',
        'target' => ApiController::class . '::setSiteCustomDomainAction',
        'access' => 'public'
    ],
    'redirect_add' => [
        'path' => '/otadmin/redirect/add',
        'target' => ApiController::class . '::addRedirectionAction',
        'access' => 'public'
    ],
    'site_resetperms' => [
        'path' => '/otadmin/site/reset-perms',
        'target' => ApiController::class . '::resetBeUserPermsAction',
        'access' => 'public'
    ],
    'site_status' => [
        'path' => '/otadmin/site/status',
        'target' => ApiController::class . '::getSiteStatusAction',
        'access' => 'public'
    ],
    'scan' => [
        'path' => '/otadmin/scan',
        'target' => ApiController::class . '::scanAllAction',
        'access' => 'public'
    ]
];
