nodejs: submit filled form

This commit is contained in:
Sergey Linnik
2021-01-28 17:24:01 +03:00
parent e53dac1e2b
commit c3bb70aa9a
3 changed files with 28 additions and 9 deletions

View File

@ -109,9 +109,11 @@ docManager.createDemo = function (demoName, userid, username) {
return fileName;
};
docManager.saveFileData = function (fileName, userid, username) {
const userAddress = docManager.curUserHostAddress();
const date_create = fileSystem.statSync(docManager.storagePath(fileName)).mtime;
docManager.saveFileData = function (fileName, userid, username, userAddress) {
if (!userAddress) {
userAddress = docManager.curUserHostAddress();
}
const date_create = fileSystem.statSync(docManager.storagePath(fileName, userAddress)).mtime;
const minutes = (date_create.getMinutes() < 10 ? '0' : '') + date_create.getMinutes().toString();
const month = (date_create.getMonth() < 10 ? '0' : '') + (parseInt(date_create.getMonth().toString()) + 1);
const sec = (date_create.getSeconds() < 10 ? '0' : '') + date_create.getSeconds().toString();