<?php

use Illuminate\Support\Facades\Route;
use Modules\Cms\Http\Controllers\CmsPageController;

// CMS content (FAQ, About Us, Terms, etc.) is public and typically shown
// before the user logs in, so unlike the catalog/routing endpoints this
// group skips api.auth — throttle:api-read still rate-limits it by IP.
Route::prefix('api/v1')->middleware(['api', 'throttle:api-read'])->group(function () {
    Route::get('/cms-pages', [CmsPageController::class, 'index'])->name('cms.pages.index');
    Route::get('/cms-pages/{page}', [CmsPageController::class, 'show'])->name('cms.pages.show');
});
