[texture-description] update middleware

This commit is contained in:
Pig Fang 2023-01-29 11:57:06 +08:00
parent b2715669f6
commit 7bca674bcd
No known key found for this signature in database
GPG Key ID: A8198F548DADA9E2
2 changed files with 5 additions and 3 deletions

View File

@ -1,7 +1,7 @@
{
"name": "texture-description",
"title": "Blessing\\TextureDescription::general.title",
"version": "1.3.1",
"version": "1.3.2",
"description": "Blessing\\TextureDescription::general.description",
"author": "Steven Qiu & GPlane",
"url": "",

View File

@ -1,14 +1,16 @@
<?php
use Illuminate\Routing\Middleware\SubstituteBindings;
Route::prefix('texture/{texture}/description')
->middleware(['web', 'bindings'])
->middleware(['web', SubstituteBindings::class])
->group(function () {
Route::get('', 'DescriptionController@read');
Route::put('', 'DescriptionController@update')->middleware(['auth']);
});
Route::prefix('api/textures/{texture}/description')
->middleware(['api', 'throttle:60,1', 'bindings'])
->middleware(['api', 'throttle:60,1', SubstituteBindings::class])
->group(function () {
Route::get('', 'DescriptionController@read');
Route::put('', 'DescriptionController@update')->middleware(['auth']);