Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
andris9 committed Sep 4, 2024
1 parent 48ba3bb commit 64eb042
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
5 changes: 1 addition & 4 deletions lib/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -1844,6 +1844,7 @@ uMDwyq9Y+GFLdSZF
Qmt72SAp9U458OaT
PlpLZjr4BL0pohCK
WO98DhF4vrdYWoNN
0GY3Y69nPMhxmQ0z
G8IkXqjVdLZwBK/I
+AZoia19FAsARLE/
Wp6z04Yho9uWIObC
Expand All @@ -1862,10 +1863,6 @@ h7Squx/sKZNkDat0
//m57pmYUuiv84pZ
wInk+UccjElRBe8v
czn1ie17ikAXC0fx
bp3iCgOwvQyncj1n
U5YAhY30g8d7nDpu
JF+qOcL5dIiYUija
hAso3Wv1mlMIHmOQ
xV1YkQ3cgw0EpJZ8
AP9o7PxYTzhDxdZa
qurB4y++jCni0Bpf
Expand Down
5 changes: 4 additions & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ const NO_ACTIVE_HANDLER_RESP = {
// check for upgrades once in 8 hours
const UPGRADE_CHECK_TIMEOUT = 1 * 24 * 3600 * 1000;
const LICENSE_CHECK_TIMEOUT = 20 * 60 * 1000;
const MAX_LICENSE_CHECK_DELAY = 30 * 24 * 60 * 60 * 1000;

const licenseInfo = {
active: false,
Expand Down Expand Up @@ -1138,7 +1139,9 @@ let licenseCheckHandler = async opts => {
await redis.hdel(`${REDIS_PREFIX}settings`, 'subexp');
await redis.hset(`${REDIS_PREFIX}settings`, 'kv', Buffer.from(packageData.version).toString('hex'));
if (data.validatedUntil) {
await redis.hset(`${REDIS_PREFIX}settings`, 'ks', new Date(data.validatedUntil).getTime().toString(16));
let validatedUntil = new Date(data.validatedUntil);
let nextCheck = Math.min(now + MAX_LICENSE_CHECK_DELAY, validatedUntil.getTime());
await redis.hset(`${REDIS_PREFIX}settings`, 'ks', new Date(nextCheck).getTime().toString(16));
}
}
} catch (err) {
Expand Down
2 changes: 1 addition & 1 deletion views/templates/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
</p>

<pre>$ curl "<span class="cur-base-url" data-origin="">http://127.0.0.1:3000</span>/v1/account/example/submit" \
-H "Authorization: Bearer <token>" \
-H "Authorization: Bearer &lt;token&gt;" \
-H "Content-type: application/json" \
-d '{
&quot;from&quot;: {
Expand Down

0 comments on commit 64eb042

Please sign in to comment.