Optional password protection for the web server

This commit is contained in:
Cadence Ember
2025-02-25 14:36:49 +13:00
parent 3bc37857bb
commit 3b034dd6e5
9 changed files with 103 additions and 32 deletions

View File

@@ -23,7 +23,7 @@ async function getManagedGuilds(event) {
/**
* @param {h3.H3Event} event
* @returns {ReturnType<typeof h3.useSession<{userID?: string, mxid?: string, managedGuilds?: string[], state?: string, selfService?: boolean}>>}
* @returns {ReturnType<typeof h3.useSession<{userID?: string, mxid?: string, managedGuilds?: string[], state?: string, selfService?: boolean, password?: string}>>}
*/
function useSession(event) {
return h3.useSession(event, {password: reg.as_token})