From 5953a148930f18d49ac4700d3f34ea764edb7828 Mon Sep 17 00:00:00 2001 From: gor_down Date: Wed, 7 May 2025 17:23:16 -0300 Subject: [PATCH] xddddddd --- src/utils/createCommonPath.js | 14 ++++++++------ views/home.hbs | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/utils/createCommonPath.js b/src/utils/createCommonPath.js index 0d571f3..7ca0b2c 100644 --- a/src/utils/createCommonPath.js +++ b/src/utils/createCommonPath.js @@ -3,7 +3,7 @@ const appDir = dirname(require.main.filename); const fs = require('fs') const langs = ["es", "en"] -function createCommonPath(router, path, renderParams = { +async function createCommonPath(router, path, renderParams = { }, cb = () => {}){ const defaultParams = { view: path, @@ -30,11 +30,13 @@ function createCommonPath(router, path, renderParams = { } } renderOptions.lang = "es" - createPath('/' + path, cb, renderOptions, router) - langs.forEach(l => { - renderOptions.lang = l - createPath('/' + l + "/" + path, cb, renderOptions, router) - }) + renderOptions.langPath = "" + await createPath('/' + path, cb, renderOptions, router) + // for(let l in langs){ + // renderOptions.lang = l + // renderOptions.langPath = l + '/' + // await createPath('/' + renderOptions.langPath + path, cb, renderOptions, router) + // } } async function createPath(path, cb, renderOptions, router){ diff --git a/views/home.hbs b/views/home.hbs index 396df83..3d14ae1 100644 --- a/views/home.hbs +++ b/views/home.hbs @@ -2,7 +2,7 @@


- Puede que esta red deje de andar por https cada 30 minutos. En su lugar, usa http + Puede que esta red deje de andar por https cada 30 minutos. En su lugar, usa http