Changed ctime to mtime. And turned off static routes. They are handled by nginx now.

This commit is contained in:
Alexander Andreev 2021-02-10 01:56:53 +04:00
parent 23861292d1
commit 8b3e93d5e0
Signed by: Arav
GPG Key ID: 610DF2574456329F
1 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ const Koa = require("koa");
const koaPug = require("koa-pug");
const koaRouter = require("koa-router");
const koaRange = require("koa-range");
const koaServe = require("koa-static");
//const koaServe = require("koa-static");
const FileType = require("file-type");
const config = require("./config");
@ -57,14 +57,14 @@ async function getDirectoryList(dir_path, base_url) {
dirs.push({
name: dirent.name,
link: `${base_url}${encodeURIComponent(dirent.name)}/`,
datetime: util.datetime(stat.ctime, util.formats.file_date),
datetime: util.datetime(stat.mtime, util.formats.file_date),
size: "DIR",
size_unit: '' });
else
files.push({
name: dirent.name,
link: `${base_url}${encodeURIComponent(dirent.name)}`,
datetime: util.datetime(stat.ctime, util.formats.file_date),
datetime: util.datetime(stat.mtime, util.formats.file_date),
size: +s,
size_unit: u });
}