refactor: 修改视频分类相关接口
This commit is contained in:
@@ -47,6 +47,7 @@ class VideoCategory
|
||||
$id = request()->param('id');
|
||||
|
||||
$category = VideoCategoryModel::withoutField([
|
||||
'language_id',
|
||||
'created_at',
|
||||
'updated_at'
|
||||
])
|
||||
@@ -120,7 +121,7 @@ class VideoCategory
|
||||
$sort = request()->post('sort');
|
||||
|
||||
$validate = new VideoCategoryValidate;
|
||||
if (!$validate::scene('sort')->check(['id' => $id,'sort' => $sort])) {
|
||||
if (!$validate->scene('sort')->check(['id' => $id,'sort' => $sort])) {
|
||||
return error($validate::getError());
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ Route::group('v1', function () {
|
||||
Route::put('update/:id', 'VideoCategory/update');
|
||||
|
||||
// 设置视频分类排序值
|
||||
Route::put('sort/:id', 'VideoCategory/sort');
|
||||
Route::post('sort/:id', 'VideoCategory/sort');
|
||||
|
||||
// 视频分类删除
|
||||
Route::delete('delete/:id', 'VideoCategory/delete');
|
||||
|
||||
Reference in New Issue
Block a user