<?php

use CodeIgniter\Router\RouteCollection;


$routes->group('wiki', ['namespace' => 'App\Controllers\Wiki'], function ($routes) {
    $routes->get('','WikiController::index',["as" => "wikiIndex"]);
    $routes->get('view/(:segment)','WikiController::show_page/$1',["as" => "showWikiPage"]);
    $routes->get('section/(:num)','WikiController::get_section/$1',["as" => "getWikiSection"]);
    $routes->post('section','WikiController::store_section',["as" => "storeWikiSection"]);
    $routes->delete('section/(:num)','WikiController::delete_section/$1',["as" => "deleteWikiSection"]);
    $routes->post('update/section','WikiController::update_section',["as" => "updateWikiSection"]);
    $routes->post('save/(:num)','WikiController::store_save_page/$1',["as" => "storeWikiSavePage"]);
    $routes->post('publish/(:num)','WikiController::store_publish_page/$1',["as" => "storeWikiPublishPage"]);
    $routes->post('file/upload/(:num)','WikiController::wiki_file_upload/$1',["as" => "storeWikiFileUpload"]);
    $routes->get('file/(:num)','WikiController::get_wiki_file/$1',["as" => "getWikiFile"]);
    $routes->post('section/update/order','WikiController::wiki_section_update_order',["as" => "updateWikiSectionOrder"]);


});