AXCWG 3 hónapja
szülő
commit
65feb5e542
3 módosított fájl, 13 hozzáadás és 53 törlés
  1. 2 2
      UserInteractions.js
  2. 11 48
      package-lock.json
  3. 0 3
      package.json

+ 2 - 2
UserInteractions.js

@@ -31,10 +31,10 @@ module.exports = function UserInteractions(opts) {
     app.use(express.json());
     let db = opts.db;
     console.log("init")
-    app.post("/userapi", (req, res) => {
+    app.get("/userapi", (req, res) => {
         res.end(JSON.stringify(req.session));
     })
-    app.post("/login", async function (req, res) {
+    app.post("/login", async functioqn (req, res) {
         db.execute("SELECT uuid from user where username = ? and password = ?", [req.body.username, await sha256(req.body.password)], function (err, result) {
             if (result.length === 0) {
                 res.status(500).json({code: 500, R: "DNE"})

+ 11 - 48
package-lock.json

@@ -13,13 +13,10 @@
         "cnchar": "^3.2.6",
         "express": "^4.21.1",
         "express-session": "^1.18.1",
-        "html-entities": "^2.5.2",
         "https": "^1.0.0",
-        "https-proxy-agent": "^7.0.6",
         "js-queue": "^2.0.2",
         "minimist": "^1.2.8",
         "mysql2": "^3.11.5",
-        "node-fetch": "^2.7.0",
         "node-run-cmd": "^1.0.1",
         "nodemailer": "^6.9.16",
         "opencc": "github:BYVoid/OpenCC",
@@ -786,9 +783,9 @@
       }
     },
     "node_modules/express": {
-      "version": "4.21.1",
-      "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz",
-      "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==",
+      "version": "4.21.2",
+      "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz",
+      "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==",
       "license": "MIT",
       "dependencies": {
         "accepts": "~1.3.8",
@@ -810,7 +807,7 @@
         "methods": "~1.1.2",
         "on-finished": "2.4.1",
         "parseurl": "~1.3.3",
-        "path-to-regexp": "0.1.10",
+        "path-to-regexp": "0.1.12",
         "proxy-addr": "~2.0.7",
         "qs": "6.13.0",
         "range-parser": "~1.2.1",
@@ -825,6 +822,10 @@
       },
       "engines": {
         "node": ">= 0.10.0"
+      },
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/express"
       }
     },
     "node_modules/express-session": {
@@ -1136,22 +1137,6 @@
         "node": ">= 0.4"
       }
     },
-    "node_modules/html-entities": {
-      "version": "2.5.2",
-      "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.5.2.tgz",
-      "integrity": "sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA==",
-      "funding": [
-        {
-          "type": "github",
-          "url": "https://github.com/sponsors/mdevils"
-        },
-        {
-          "type": "patreon",
-          "url": "https://patreon.com/mdevils"
-        }
-      ],
-      "license": "MIT"
-    },
     "node_modules/http-cache-semantics": {
       "version": "4.1.1",
       "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz",
@@ -1196,28 +1181,6 @@
       "integrity": "sha512-4EC57ddXrkaF0x83Oj8sM6SLQHAWXw90Skqu2M4AEWENZ3F02dFJE/GARA8igO79tcgYqGrD7ae4f5L3um2lgg==",
       "license": "ISC"
     },
-    "node_modules/https-proxy-agent": {
-      "version": "7.0.6",
-      "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz",
-      "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==",
-      "license": "MIT",
-      "dependencies": {
-        "agent-base": "^7.1.2",
-        "debug": "4"
-      },
-      "engines": {
-        "node": ">= 14"
-      }
-    },
-    "node_modules/https-proxy-agent/node_modules/agent-base": {
-      "version": "7.1.3",
-      "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz",
-      "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==",
-      "license": "MIT",
-      "engines": {
-        "node": ">= 14"
-      }
-    },
     "node_modules/humanize-ms": {
       "version": "1.2.1",
       "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz",
@@ -1979,9 +1942,9 @@
       }
     },
     "node_modules/path-to-regexp": {
-      "version": "0.1.10",
-      "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz",
-      "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==",
+      "version": "0.1.12",
+      "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz",
+      "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==",
       "license": "MIT"
     },
     "node_modules/prebuild-install": {

+ 0 - 3
package.json

@@ -16,13 +16,10 @@
     "cnchar": "^3.2.6",
     "express": "^4.21.1",
     "express-session": "^1.18.1",
-    "html-entities": "^2.5.2",
     "https": "^1.0.0",
-    "https-proxy-agent": "^7.0.6",
     "js-queue": "^2.0.2",
     "minimist": "^1.2.8",
     "mysql2": "^3.11.5",
-    "node-fetch": "^2.7.0",
     "node-run-cmd": "^1.0.1",
     "nodemailer": "^6.9.16",
     "opencc": "github:BYVoid/OpenCC",