Skip to content

Commit 384c07d

Browse files
updated
1 parent bc23ea6 commit 384c07d

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

pages.js

+13-1
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,24 @@ const router = express.Router();
33
const fs = require("fs");
44
const os = require("os");
55
const path = require("path");
6+
const {
7+
getRandomInt,
8+
getRandomBin,
9+
getRandomHex,
10+
generateToken,
11+
ordenarUsuario,
12+
pesqUsuario,
13+
validadeApiKey,
14+
unauthorized,
15+
forbidden,
16+
formatDate,
17+
conversorSimEnao,
18+
} = require("npm-package-nodejs-utils-lda");
619

720
const files = __dirname + "/src/";
821
const path_css = files + "css/";
922
const path_js = files + "js/";
1023
const path_pages = files + "pages/";
11-
const forbiddenFilePath = path.join(path_pages, "forbidden.html");
1224
const indexFilePath = path.join(path_pages, "index.html");
1325
const hostFilePath = path.join(path_pages, "host.html");
1426

rotas.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const router = express.Router();
33
const fs = require("fs");
44
const path = require("path");
55
const multer = require("multer");
6-
const { fetchGet, fetchPost } = require("./modules/fetchModule.js");
6+
const { fetchGet, fetchPost } = require("npm-package-nodejs-utils-lda");
77
const {
88
getRandomInt,
99
getRandomBin,
@@ -16,7 +16,7 @@ const {
1616
forbidden,
1717
formatDate,
1818
conversorSimEnao,
19-
} = require("./modules/utils.js");
19+
} = require("npm-package-nodejs-utils-lda");
2020

2121
const storagePages = multer.diskStorage({
2222
destination: (req, file, cb) => {
@@ -32,9 +32,6 @@ const storagePages = multer.diskStorage({
3232
},
3333
});
3434

35-
router.use(express.urlencoded({ extended: true }));
36-
router.use(express.json());
37-
3835
// obter o banco de dados de arquivos hosteados automaticamente
3936
router.get("/host=data", (req, res) => {
4037
console.log("SISTEMA <OBTER> <ARQUIVO>: " + req.url);

0 commit comments

Comments
 (0)