diff --git a/src/modules/api/submodules/p2p.ts b/src/modules/api/submodules/p2p.ts index 9b6b526..25ff9fe 100644 --- a/src/modules/api/submodules/p2p.ts +++ b/src/modules/api/submodules/p2p.ts @@ -380,6 +380,7 @@ function setup(data: SubmoduleData): Submodule { let peers: PeerInfo[] = utils.ReadJSON(paths.peersFile) let selfInfo: PeerInfo = utils.ReadJSON(paths.selfInfoFile) + // TODO: this should be checked by files! if (!isJsonValidAndLogError(peers, PeersInfoSchema, paths.peersFile)) { throw new Error('Invalid peers file') } @@ -895,7 +896,10 @@ function setup(data: SubmoduleData): Submodule { res.json(getSelfInfo(true)) }) + // TODO: get all user files + app.get('/getnewdatasince', (req: Request, res: Response) => { + // TODO: add to third party peers, and recieve self info // FIXME: hash question db to see if different? // it could help in determining if it should be checked for new data, but it would only save // a getNewDataSince() call per question db diff --git a/src/sharedViews/login.ejs b/src/sharedViews/login.ejs index c679ff6..093646d 100644 --- a/src/sharedViews/login.ejs +++ b/src/sharedViews/login.ejs @@ -122,7 +122,7 @@ button.innerText = '...' button.classList.add('disabledButton') button.disabled = true - const rawResponse = await fetch('<%= devel? 'http' : 'https' %>://api.frylabs.net/login', { + const rawResponse = await fetch('<%= devel ? 'http' : 'https' %>://frylabs.net/api/login', { method: 'POST', credentials: 'include', headers: { diff --git a/src/utils/logger.ts b/src/utils/logger.ts index 3cf472f..6dca654 100755 --- a/src/utils/logger.ts +++ b/src/utils/logger.ts @@ -116,21 +116,6 @@ function LogReq( return } - let hostname - if (req.hostname) { - hostname = req.hostname.replace('www.', '').split('.')[0] - } else { - hostname = 'NOHOST' - Log( - 'req.hostname is undefined! req.hostname: ' + req.hostname, - GetColor('redbg') - ) - } - if (!toFile) { - hostname = expandWithSpaces(hostname, 10) - } - - logEntry += logHashed(hostname) + dl if (toFile) { logEntry += req.headers['user-agent'] + dl logEntry += req.method + dl diff --git a/submodules/qmining-page b/submodules/qmining-page index d455389..5c779a6 160000 --- a/submodules/qmining-page +++ b/submodules/qmining-page @@ -1 +1 @@ -Subproject commit d4553896afa8653c628aa968a37b3601e7f860e7 +Subproject commit 5c779a657dc0543cef2abc886057e7828ce711f8