<?php

use Illuminate\Support\Facades\Route;
use App\Modules\TextMagic\Controllers\TextMagicApiController;

/*
|--------------------------------------------------------------------------
| TextMagic Module Routes
|--------------------------------------------------------------------------
|
| Here are the routes for the TextMagic module. These routes are loaded
| by the TextMagicServiceProvider when the module is booted.
|
*/

// API Routes with auth and admin middleware
Route::prefix('api/v1')->middleware(['web', 'auth', 'adminCheck'])->group(function () {

    // TextMagic API Controller Routes
    Route::controller(TextMagicApiController::class)->group(function () {
        // SMS Operations
        Route::post('/textmagic/send', 'send');
        Route::post('/textmagic/test-credentials', 'testCredentials');
    });
});
