daveappserver 0.6.37 → 0.6.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/appserver.js +5 -5
  2. package/package.json +1 -1
package/appserver.js CHANGED
@@ -1,4 +1,4 @@
1
- var myVersion = "0.6.37", myProductName = "daveAppServer";
1
+ var myVersion = "0.6.39", myProductName = "daveAppServer";
2
2
 
3
3
  exports.start = startup;
4
4
  exports.notifySocketSubscribers = notifySocketSubscribers;
@@ -61,7 +61,7 @@ var config = {
61
61
  operationToConfirm: "add your email address to your FeedLand user profile",
62
62
  mailSender: "dave@scripting.com",
63
63
  dataFolder: "data/",
64
- confirmationExpiresAfter: 60 * 60, //emails expire after an hour
64
+ confirmationExpiresAfter: 60 * 60 * 24, //emails expire after 24 hours
65
65
 
66
66
  flSecureWebsocket: false, //2/8/23 by DW
67
67
 
@@ -1064,7 +1064,7 @@ function cleanFileStats (stats) { //4/19/21 by DW
1064
1064
  else {
1065
1065
  var flFoundConfirm = false;
1066
1066
  stats.pendingConfirmations.forEach (function (item) {
1067
- if (item.magicString == emailConfirmCode) {
1067
+ if (item.magicString == magicString) {
1068
1068
  callback (undefined, item);
1069
1069
  flFoundConfirm = true;
1070
1070
  }
@@ -1097,7 +1097,7 @@ function cleanFileStats (stats) { //4/19/21 by DW
1097
1097
  }
1098
1098
  function checkPendingConfirmations (callback) { //8/14/23 by DW
1099
1099
  if (config.flUseDatabaseForConfirmations) {
1100
- const sqltext = "delete from pendingConfirmations where whenCreated < now() - interval 1 hour;";
1100
+ const sqltext = "delete from pendingConfirmations where whenCreated < now() - interval " + config.confirmationExpiresAfter + " minute;";
1101
1101
  davesql.runSqltext (sqltext, function (err, result) {
1102
1102
  if (err) {
1103
1103
  if (callback !== undefined) {
@@ -1761,8 +1761,8 @@ function startup (options, callback) {
1761
1761
  }
1762
1762
  if (now.getMinutes () == 0) {
1763
1763
  console.log ("\n" + now.toLocaleTimeString () + ": " + config.productName + " v" + config.version + " running on port " + config.port + ".\n");
1764
+ checkPendingConfirmations (); //12/7/22 by DW
1764
1765
  }
1765
- checkPendingConfirmations (); //12/7/22 by DW
1766
1766
  }
1767
1767
  function everySecond () {
1768
1768
  if (flStatsChanged) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "daveappserver",
3
3
  "description": "Factored code that was appearing in all my servers.",
4
- "version": "0.6.37",
4
+ "version": "0.6.39",
5
5
  "main": "appserver.js",
6
6
  "repository": {
7
7
  "type" : "git",