From f7d4f425518dfac575fa02bd2a30c245805095d4 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Thu, 9 Mar 2023 09:26:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=87=8D=E5=91=BD=E5=90=8D=E5=88=AB?= =?UTF-8?q?=E4=BA=BA=E5=85=B1=E4=BA=AB=E7=9A=84=E6=96=87=E4=BB=B6=E5=90=8E?= =?UTF-8?q?=E4=B8=8D=E8=A7=81=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Api/FileController.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Api/FileController.php b/app/Http/Controllers/Api/FileController.php index b5ede8183..ef6879241 100755 --- a/app/Http/Controllers/Api/FileController.php +++ b/app/Http/Controllers/Api/FileController.php @@ -248,8 +248,12 @@ class FileController extends AbstractController $file->name = $name; $file->handleDuplicateName(); $file->save(); - $file->pushMsg('update', $file); - return Base::retSuccess('修改成功', $file); + $data = [ + 'id' => $file->id, + 'name' => $file->name, + ]; + $file->pushMsg('update', $data); + return Base::retSuccess('修改成功', $data); } else { // 添加 if (!in_array($type, [