forked from cadence/out-of-your-element
Upload web code
This commit is contained in:
parent
1d2daf2504
commit
b6c23c30fb
22 changed files with 765 additions and 6 deletions
|
@ -38,6 +38,7 @@ const passthrough = require("../src/passthrough")
|
|||
const db = new sqlite("ooye.db")
|
||||
const migrate = require("../src/db/migrate")
|
||||
|
||||
/** @type {import("heatsync").default} */ // @ts-ignore
|
||||
const sync = new HeatSync({watchFS: false})
|
||||
|
||||
Object.assign(passthrough, {sync, db})
|
||||
|
@ -166,8 +167,28 @@ async function validateHomeserverOrigin(serverUrlPrompt, url) {
|
|||
}
|
||||
}
|
||||
})
|
||||
|
||||
console.log("What is your Discord client secret?")
|
||||
/** @type {{discord_client_secret: string}} */
|
||||
const clientSecretResponse = await prompt({
|
||||
type: "input",
|
||||
name: "discord_client_secret",
|
||||
message: "Client secret"
|
||||
})
|
||||
|
||||
const template = getTemplateRegistration()
|
||||
reg = {...template, url: bridgeOriginResponse.bridge_origin, ooye: {...template.ooye, ...serverNameResponse, ...bridgeOriginResponse, server_origin: serverOrigin, ...discordTokenResponse}}
|
||||
reg = {
|
||||
...template,
|
||||
url: bridgeOriginResponse.bridge_origin,
|
||||
ooye: {
|
||||
...template.ooye,
|
||||
...serverNameResponse,
|
||||
...bridgeOriginResponse,
|
||||
server_origin: serverOrigin,
|
||||
...discordTokenResponse,
|
||||
...clientSecretResponse
|
||||
}
|
||||
}
|
||||
registration.reg = reg
|
||||
checkRegistration(reg)
|
||||
writeRegistration(reg)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue