forked from DebaucheryLibrarian/traxxx
Added rudimentary affiliate banner setup. Separated login and signup disable. Added various tag photos.
This commit is contained in:
@@ -22,7 +22,7 @@ async function verifyPassword(password, storedPassword) {
|
||||
}
|
||||
|
||||
async function login(credentials) {
|
||||
if (!config.auth.enabled) {
|
||||
if (!config.auth.login) {
|
||||
throw new HttpError('Authentication is disabled', 405);
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ async function login(credentials) {
|
||||
}
|
||||
|
||||
async function signup(credentials) {
|
||||
if (!config.auth.enabled) {
|
||||
if (!config.auth.signup) {
|
||||
throw new HttpError('Authentication is disabled', 405);
|
||||
}
|
||||
|
||||
|
||||
@@ -152,7 +152,8 @@ async function initServer() {
|
||||
res.render(path.join(__dirname, '../../assets/index.ejs'), {
|
||||
env: JSON.stringify({
|
||||
sfw: !!req.headers.sfw || Object.prototype.hasOwnProperty.call(req.query, 'sfw'),
|
||||
auth: config.auth.enabled,
|
||||
login: config.auth.login,
|
||||
signup: config.auth.signup,
|
||||
sessionId: req.session.safeId,
|
||||
}),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user