lots of progress
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use App\Http\Controllers\JsonApiController;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| API Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here is where you can register API routes for your application. These
|
||||
| routes are loaded by the RouteServiceProvider and all of them will
|
||||
| be assigned to the "api" middleware group. Make something great!
|
||||
|
|
||||
*/
|
||||
|
||||
Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
|
||||
return $request->user();
|
||||
});
|
||||
|
||||
// JSON Validation API Routes
|
||||
Route::prefix('json')->group(function () {
|
||||
// Validate JSON
|
||||
Route::post('/validate', [JsonApiController::class, 'validateJson']);
|
||||
|
||||
// Validate JSON against schema
|
||||
Route::post('/validate-schema', [JsonApiController::class, 'validateSchema']);
|
||||
|
||||
// Format JSON
|
||||
Route::post('/format', [JsonApiController::class, 'formatJson']);
|
||||
|
||||
// Compare JSON documents
|
||||
Route::post('/compare', [JsonApiController::class, 'compareJson']);
|
||||
});
|
||||
+25
-1
@@ -4,13 +4,37 @@ use App\Http\Controllers\ProfileController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::get('/', function () {
|
||||
return view('welcome');
|
||||
return view('jsonlint');
|
||||
});
|
||||
|
||||
Route::get('/compare', function () {
|
||||
return view('jsoncompare');
|
||||
});
|
||||
|
||||
Route::get('/dashboard', function () {
|
||||
return view('dashboard');
|
||||
})->middleware(['auth', 'verified'])->name('dashboard');
|
||||
|
||||
Route::get('/jsonlint', function () {
|
||||
return view('jsonlint');
|
||||
});
|
||||
|
||||
Route::get('/jsoncompare', function () {
|
||||
return view('jsoncompare');
|
||||
});
|
||||
|
||||
Route::get('/jsonschema', function () {
|
||||
return view('jsonschema');
|
||||
});
|
||||
|
||||
Route::get('/jsontemplates', function () {
|
||||
return view('jsontemplates');
|
||||
});
|
||||
|
||||
Route::get('/api', function () {
|
||||
return view('api');
|
||||
})->name('api');
|
||||
|
||||
Route::middleware('auth')->group(function () {
|
||||
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
|
||||
Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
|
||||
|
||||
Reference in New Issue
Block a user