mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-31 19:57:06 +01:00
fix to do num-based comparison
This commit is contained in:
parent
c8f22f5fb1
commit
5cd4b31648
1 changed files with 3 additions and 5 deletions
|
@ -11,11 +11,10 @@ function ccallString(proc, closure, str) {
|
||||||
function registerOnce(devid, gitrev, now) {
|
function registerOnce(devid, gitrev, now) {
|
||||||
let nextTimeKey = 'next_reg';
|
let nextTimeKey = 'next_reg';
|
||||||
let gitKey = 'last_write';
|
let gitKey = 'last_write';
|
||||||
let nextTime = localStorage.getItem(nextTimeKey);
|
let nextTime = parseInt(localStorage.getItem(nextTimeKey));
|
||||||
let prevGit = localStorage.getItem(gitKey);
|
let prevGit = localStorage.getItem(gitKey);
|
||||||
// false: for now, always register. PENDING
|
if ( prevGit == gitrev && now < nextTime ) {
|
||||||
if ( false && prevGit == gitrev && now < nextTime ) {
|
console.log('registerOnce(): next in ' + (nextTime - now) + ' secs');
|
||||||
// console.log("registerOnce: skipping");
|
|
||||||
} else {
|
} else {
|
||||||
let args = { devid: devid,
|
let args = { devid: devid,
|
||||||
gitrev: gitrev,
|
gitrev: gitrev,
|
||||||
|
@ -27,7 +26,6 @@ function registerOnce(devid, gitrev, now) {
|
||||||
vrntName: 'wasm',
|
vrntName: 'wasm',
|
||||||
};
|
};
|
||||||
let body = JSON.stringify(args);
|
let body = JSON.stringify(args);
|
||||||
// console.log('registerOnce(): args: ' + body);
|
|
||||||
|
|
||||||
fetch('/xw4/api/v1/register', {
|
fetch('/xw4/api/v1/register', {
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
Loading…
Add table
Reference in a new issue