Centralized navbar template rendering property definitions.

This commit is contained in:
rainbow napkin 2026-10-17 02:38:50 -04:00
parent b9bfa5271e
commit 03fecaddc2
16 changed files with 84 additions and 88 deletions

View file

@ -14,12 +14,9 @@ GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.*/
//Config
const config = require('../../config.json');
//Local Imports
const navRender = require('./navRender');
const altchaUtils = require('../utils/altchaUtils');
const csrfUtils = require('../utils/csrfUtils');
//register page functions
module.exports.get = async function(req, res){
@ -27,5 +24,5 @@ module.exports.get = async function(req, res){
const challenge = await altchaUtils.genCaptcha();
//Render page
return res.render('migrate', {instance: config.instanceName, links: config.links, user: req.session.user, challenge, csrfToken: csrfUtils.generateToken(req)});
return navRender.render(req, res, 'migrate', {challenge});
}