Browse Source

File API Bugfix

Celine 3 years ago
parent
commit
9d52ec1832

+ 2 - 0
.gitignore

@@ -0,0 +1,2 @@
+
+fileControlPanel/public/

+ 1 - 1
core/Configuration/Patch/file_api.class.php

@@ -29,7 +29,7 @@ class file_api extends DatabaseScript {
       ->addRow("File/CreateUploadToken", array(USER_GROUP_ADMIN), "Allows users to create a token to upload files to the virtual filesystem assigned to the users account")
       ->addRow("File/CreateDownloadToken", array(USER_GROUP_ADMIN), "Allows users to create a token to download files from the virtual filesystem assigned to the users account");
 
-    $queries[] = $sql->, array("request", "action", "target", "extra"))
+    $queries[] = $sql->insert("Route", array("request", "action", "target", "extra"))
       ->onDuplicateKeyStrategy(new UpdateStrategy(array("request"), array("request" => new Column("request"))))
       ->addRow("^/files(/.*)?$", "dynamic", "\\Documents\\Files", NULL);
 

File diff suppressed because it is too large
+ 427 - 441
fileControlPanel/package-lock.json


+ 5 - 5
fileControlPanel/package.json

@@ -9,10 +9,11 @@
     "react-dom": "^16.13.1",
     "react-draft-wysiwyg": "^1.14.5",
     "react-router-dom": "^5.2.0",
-    "react-scripts": "^3.4.1"
+    "react-scripts": "^3.4.4"
   },
   "scripts": {
-    "build": "webpack --mode production && mv dist/main.js ../js/files.min.js"
+    "build": "webpack --mode production && mv dist/main.js ../js/files.min.js",
+    "debug": "react-scripts start"
   },
   "eslintConfig": {
     "extends": "react-app"
@@ -29,13 +30,12 @@
       "last 1 safari version"
     ]
   },
+  "proxy": "http://localhost",
   "devDependencies": {
     "@babel/core": "^7.10.2",
     "@babel/preset-env": "^7.10.2",
     "@babel/preset-react": "^7.10.1",
     "babel-loader": "^8.1.0",
-    "babel-polyfill": "^6.26.0",
-    "webpack": "^4.43.0",
-    "webpack-cli": "^3.3.11"
+    "babel-polyfill": "^6.26.0"
   }
 }

+ 4 - 2
fileControlPanel/src/index.js

@@ -1,6 +1,8 @@
 import React from 'react';
 import ReactDOM from 'react-dom';
-import API from "../../adminPanel/src/api";
+import API from "./api";
+
+
 
 class FileControlPanel extends React.Component {
 
@@ -14,7 +16,7 @@ class FileControlPanel extends React.Component {
 
     render() {
 
-        if (!this.state.loadend) {
+        if (!this.state.loaded) {
             this.api.fetchUser().then(() => {
                 this.setState({ ...this.state, loaded: true });
             });

Some files were not shown because too many files changed in this diff