Closed juancarlospaco closed 5 years ago
Fast 💨 !!
The routes placement needs to be changed. It will eat all the routes below, so they will not be accessible, e.g.:
Plugin URL's will not be included:
I dont know how to fix that, maybe is not so easy...
/p/
is causing :grey_question: Can we reproduce the problem :grey_question: Or just Cosmetics :grey_question: This wont work
const pageRoutes = """
get re"/*.":
createTFD()
const sql_page = sql"SELECT id FROM pages WHERE url = ?"
resp genPage(c, getValue(db, sql_page, c.req.path))
"""
macro generateRoutes(): typed =
var extensions = staticRead("resources/web/routes.nim")
for ppath in pluginsPath:
extensions.add("\n\n" & staticRead(ppath & "/routes.nim"))
extensions.add(pageRoutes)
result = parseStmt(extensions)
generateRoutes()
:thinking: :thought_balloon:
It's purely a cosmetic thing :) . I couldn't find a good solution, so that's why I chose the /p/
, which fixed the colliding routes.
/p/
./p/
.If you have any fix feel free to push here directly.
I think the breakage and incompatibilities dont worth the cosmetic improvement.
We tried tho, but I want to Close this one, Wont Fix, what do you think @ThomasTJdev :grey_question:
I think the breakage and incompatibilities dont worth the cosmetic improvement.
We tried tho, but I want to Close this one, Wont Fix, what do you think @ThomasTJdev ❔
Agree