Browse Source

Update Upload.php

Anyon 2 years ago
parent
commit
7e446bae09
1 changed files with 5 additions and 1 deletions
  1. 5 1
      app/admin/controller/api/Upload.php

+ 5 - 1
app/admin/controller/api/Upload.php

@@ -124,7 +124,11 @@ class Upload extends Controller
      */
     public function done()
     {
-        $data = $this->_vali(['id.require' => '编号不能为空!']);
+        $data = $this->_vali([
+            'id.require'   => '编号不能为空!',
+            'hash.require' => '哈希不能为空!',
+        ]);
+        $data['uuid'] = AdminService::instance()->getUserId();
         $file = SystemFile::mk()->where($data)->findOrEmpty();
         if ($file->isEmpty()) $this->error('文件不存在!');
         if ($file->save(['status' => 2])) {