mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
p2p https and login fix, removed static domain from ejs files
This commit is contained in:
parent
ae3bd7c55a
commit
e858d7f23e
13 changed files with 210 additions and 79 deletions
|
@ -24,6 +24,10 @@ import type { Database } from 'better-sqlite3'
|
|||
|
||||
import logger from '../utils/logger'
|
||||
import dbtools from '../utils/dbtools'
|
||||
import { paths } from '../utils/files'
|
||||
import utils from '../utils/utils'
|
||||
|
||||
const domain = utils.ReadFile(paths.domainFile).trim()
|
||||
|
||||
interface Options {
|
||||
userDB: Database
|
||||
|
@ -31,7 +35,7 @@ interface Options {
|
|||
}
|
||||
|
||||
export const testUser: User = {
|
||||
id: 19,
|
||||
id: 1,
|
||||
avaiblePWRequests: 645,
|
||||
pwRequestCount: 19,
|
||||
created: new Date().getTime(),
|
||||
|
@ -51,7 +55,8 @@ function renderLogin(req: Request, res: Response) {
|
|||
})
|
||||
} else {
|
||||
res.render('login', {
|
||||
devel: process.env.NS_DEVEL,
|
||||
useHttp: process.env.NS_NO_HTTPS_FORCE,
|
||||
domain: domain,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue