summary refs log tree commit diff
path: root/scripts/reset-web-password.js
blob: 9131efb588c9c7ddc59675394173aebe88f1e7c1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// @ts-check

const {reg, writeRegistration, registrationFilePath} = require("../src/matrix/read-registration")
const {prompt} = require("enquirer")

;(async () => {
	/** @type {{web_password: string}} */
	const passwordResponse = await prompt({
		type: "text",
		name: "web_password",
		message: "Choose a simple password (optional)"
	})

	reg.ooye.web_password = passwordResponse.web_password
	writeRegistration(reg)
	console.log("Saved. Restart Out Of Your Element to apply this change.")
})()