<?php

use App\Http\Controllers\Api\Admin\PrivateDocController;
use Illuminate\Support\Facades\Route;

Route::get('/', function () {
    return response()->json([
        'app'     => 'malakand.pk API',
        'version' => '1.0.0',
        'status'  => 'live',
        'admin'   => url('/admin'),
        'docs'    => url('/api'),
    ]);
});

// Signed-URL private document serving (admin-only)
Route::get('/private-docs/{disk}/{path}', [PrivateDocController::class, 'serve'])
    ->where('path', '.*')
    ->name('private.doc.serve')
    ->middleware('signed');
