<?php

use App\Http\Controllers\Api\V1\LinkController;
use App\Http\Controllers\Api\V1\WorkspaceController;
use Illuminate\Support\Facades\Route;

Route::prefix('v1')->middleware(['auth:sanctum', 'throttle:60,1'])->group(function () {
    Route::get('workspaces', [WorkspaceController::class, 'index']);

    Route::prefix('workspaces/{workspaceUlid}')->group(function () {
        Route::get('links', [LinkController::class, 'index']);
        Route::post('links', [LinkController::class, 'store']);
        Route::delete('links/{linkUlid}', [LinkController::class, 'destroy']);
    });
});
