Skip to content

Commit 35be3dc

Browse files
committed
提交代码
1 parent dcf6a5a commit 35be3dc

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

app/Http/Controllers/Admin/ConsoleController.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public function update(Request $request)
152152
$result['app_version'] = config('app.version');
153153
$result['repository'] = $repository;
154154

155-
$result['can_update'] = false;
155+
$result['can_update'] = true;
156156

157157
if(isset($repository['name'])) {
158158
if($repository['name'] != $result['app_version']) {
@@ -226,7 +226,16 @@ public function updateFile(Request $request)
226226

227227
$path = storage_path('app/').'public/uploads/files/fullstack-backend-'.$version;
228228

229-
Helper::copyDirToDir($path,base_path());
229+
$dirs = Helper::getDir($path);
230+
$files = Helper::getFileLists($path);
231+
232+
foreach ($dirs as $key => $value) {
233+
Helper::copyDirToDir(storage_path('app/').'public/uploads/files/fullstack-backend-'.$version.'/'.$value,base_path());
234+
}
235+
236+
foreach ($files as $key => $value) {
237+
Helper::copyFileToDir(storage_path('app/').'public/uploads/files/fullstack-backend-'.$version.'/'.$value,base_path());
238+
}
230239

231240
return $this->success('程序更新成功!');
232241
}

0 commit comments

Comments
 (0)