mirror of
				https://gitlab.com/MrFry/mrfrys-node-server
				synced 2025-04-01 20:24:18 +02:00 
			
		
		
		
	Stuff module path changes
This commit is contained in:
		| @@ -49,7 +49,7 @@ app.use(bodyParser.json({ | |||||||
| // -------------------------------------------------------------- | // -------------------------------------------------------------- | ||||||
|  |  | ||||||
| app.get('/*', function (req, res) { | app.get('/*', function (req, res) { | ||||||
|   let curr = listedFiles + '/' + req.url.substring('/stuff/'.length, req.url.length).split('?')[0] |   let curr = listedFiles + '/' + req.url.substring('/'.length, req.url.length).split('?')[0] | ||||||
|   let relPath = curr.substring('./public/files'.length, curr.length) |   let relPath = curr.substring('./public/files'.length, curr.length) | ||||||
|  |  | ||||||
|   if (relPath[relPath.length - 1] !== '/') { relPath += '/' } |   if (relPath[relPath.length - 1] !== '/') { relPath += '/' } | ||||||
| @@ -86,7 +86,7 @@ app.get('/*', function (req, res) { | |||||||
|       } |       } | ||||||
|     }) |     }) | ||||||
|  |  | ||||||
|     res.render('stuff/folders', { |     res.render('folders', { | ||||||
|       folders: f, |       folders: f, | ||||||
|       dirname: relPath, |       dirname: relPath, | ||||||
|       prevDir |       prevDir | ||||||
|   | |||||||
| @@ -65,7 +65,7 @@ | |||||||
| 			<%=dirname%> | 			<%=dirname%> | ||||||
| 		</h1> | 		</h1> | ||||||
| 	</center> | 	</center> | ||||||
| 	<a href=<%= "http://stuff.frylabs.net/stuff" + prevDir%> > Up one level </a> | 	<a href=<%= "http://stuff.frylabs.net" + prevDir%> > Up one level </a> | ||||||
| 	</p> | 	</p> | ||||||
|  |  | ||||||
| 	<table class="maintable"> | 	<table class="maintable"> | ||||||
| @@ -75,7 +75,7 @@ | |||||||
| 					<button class="butt">  | 					<button class="butt">  | ||||||
| 						<table class="subtable"> | 						<table class="subtable"> | ||||||
| 							<td style='width:30%;'> | 							<td style='width:30%;'> | ||||||
| 								<a href="<%= "http://stuff.frylabs.net/stuff" + folders[i].path%>"> <%=folders[i].name %> </a> | 								<a href="<%= "http://stuff.frylabs.net" + folders[i].path%>"> <%=folders[i].name %> </a> | ||||||
| 							</td> | 							</td> | ||||||
| 							<td style='width:30%;'> | 							<td style='width:30%;'> | ||||||
| 								<%=folders[i].path %> | 								<%=folders[i].path %> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user