File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed
Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -3,12 +3,24 @@ const router = express.Router();
33const fs = require ( "fs" ) ;
44const os = require ( "os" ) ;
55const 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
720const files = __dirname + "/src/" ;
821const path_css = files + "css/" ;
922const path_js = files + "js/" ;
1023const path_pages = files + "pages/" ;
11- const forbiddenFilePath = path . join ( path_pages , "forbidden.html" ) ;
1224const indexFilePath = path . join ( path_pages , "index.html" ) ;
1325const hostFilePath = path . join ( path_pages , "host.html" ) ;
1426
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ const router = express.Router();
33const fs = require ( "fs" ) ;
44const path = require ( "path" ) ;
55const multer = require ( "multer" ) ;
6- const { fetchGet, fetchPost } = require ( "./modules/fetchModule.js " ) ;
6+ const { fetchGet, fetchPost } = require ( "npm-package-nodejs-utils-lda " ) ;
77const {
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
2121const 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
3936router . get ( "/host=data" , ( req , res ) => {
4037 console . log ( "SISTEMA <OBTER> <ARQUIVO>: " + req . url ) ;
You can’t perform that action at this time.
0 commit comments