Log in with Matrix
This commit is contained in:
+2
-1
@@ -35,12 +35,13 @@ function render(event, filename, locals) {
|
||||
pugCache.set(path, async (event, locals) => {
|
||||
defaultContentType(event, "text/html; charset=utf-8")
|
||||
const session = await useSession(event, {password: reg.as_token})
|
||||
const managed = (session.data.managedGuilds || []).concat(session.data.matrixGuilds || [])
|
||||
const rel = x => getRelativePath(event.path, x)
|
||||
return template(Object.assign({},
|
||||
getQuery(event), // Query parameters can be easily accessed on the top level but don't allow them to overwrite anything
|
||||
globals, // Globals
|
||||
locals, // Explicit locals overwrite globals in case we need to DI something
|
||||
{session, event, rel} // These are assigned last so they overwrite everything else. It would be catastrophically bad if they can't be trusted.
|
||||
{session, event, rel, managed} // These are assigned last so they overwrite everything else. It would be catastrophically bad if they can't be trusted.
|
||||
))
|
||||
})
|
||||
/* c8 ignore start */
|
||||
|
||||
Reference in New Issue
Block a user