Преглед изворни кода

Update storing of files to just store the full file name.

Lee Morgan пре 4 година
родитељ
комит
e1d5befa5e
2 измењених фајлова са 2 додато и 23 уклоњено
  1. 2 2
      controllers/learn.js
  2. 0 21
      thing.html

+ 2 - 2
controllers/learn.js

@@ -106,7 +106,7 @@ module.exports = {
                         let fileString = `/documents/${fileId}.${fileParts[1]}`;
                         files.mv(`${__dirname}/..${fileString}`);
                         lecture.documents.push({
-                            name: fileParts[0],
+                            name: files.name,
                             link: fileString
                         })
                     }else{
@@ -116,7 +116,7 @@ module.exports = {
                             let fileString = `/documents/${fileId}.${fileParts[1]}`;
                             files[i].mv(`${__dirname}/..${fileString}`);
                             lecture.documents.push({
-                                name: fileParts[0],
+                                name: files[i].name,
                                 link: fileString
                             });
                         }

+ 0 - 21
thing.html

@@ -1,21 +0,0 @@
-<div id="bannerContainer">
-    <div id="errorBanner">
-        <style>
-            #bannerContainer{
-                display: flex;
-                justify-content: center;
-                width: 100vw;
-            }
-            
-            #errorBanner{
-                position: fixed;
-            top: 10px;
-            background: red;
-            color: white;
-            width: 50%;
-        }
-        </style>
-
-        <h2>${message}</h2>
-    </div>
-</div>