plsgivemeachane commited on
Commit
10dbd33
·
1 Parent(s): ffbb8f6

Error checking 4

Browse files
Files changed (1) hide show
  1. index.js +3 -3
index.js CHANGED
@@ -418,11 +418,11 @@ app.post("/auth/delete", async (req, res) => {
418
 
419
  app.post("/file/upload", async (req, res) => {
420
  // Try to write file
421
- fs.writeFileSync("uploads/" + req.body.filePath, 'TEST');
422
 
423
  // List file in /uploads/
424
- const files = fs.readdirSync("uploads");
425
- console.log(files)
426
 
427
 
428
 
 
418
 
419
  app.post("/file/upload", async (req, res) => {
420
  // Try to write file
421
+ fs.writeFileSync("uploads/test.txt", 'TEST');
422
 
423
  // List file in /uploads/
424
+ const tests = fs.readFileSync("uploads/test.txt");
425
+ console.log(tests)
426
 
427
 
428