Compare commits
No commits in common. "main" and "dev" have entirely different histories.
|
|
@ -33,13 +33,6 @@ module.exports.execute = async (interaction) => {
|
||||||
emoji: "🔄",
|
emoji: "🔄",
|
||||||
style: Discord.ButtonStyle.Danger,
|
style: Discord.ButtonStyle.Danger,
|
||||||
custom_id: "resetPassword"
|
custom_id: "resetPassword"
|
||||||
},
|
|
||||||
{
|
|
||||||
type: Discord.ComponentType.Button,
|
|
||||||
label: "LiteNet Dashboard",
|
|
||||||
emoji: "💻",
|
|
||||||
style: Discord.ButtonStyle.Link,
|
|
||||||
url: "https://litenet.tel/dashboard"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ module.exports.execute = async (interaction) => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const extData = await fpbx.getExtension(lookup.extension); // Verify extension exists
|
const extData = await fpbx.getExtension(lookup.extension); // Verify extension exists
|
||||||
|
console.log(extData)
|
||||||
await interaction.deferReply({ ephemeral: true });
|
await interaction.deferReply({ ephemeral: true });
|
||||||
// console.log(JSON.stringify(interaction, null, 2));
|
// console.log(JSON.stringify(interaction, null, 2));
|
||||||
const newPassword = interaction.fields.getTextInputValue('newPassword');
|
const newPassword = interaction.fields.getTextInputValue('newPassword');
|
||||||
|
|
@ -26,7 +26,7 @@ module.exports.execute = async (interaction) => {
|
||||||
try {
|
try {
|
||||||
const updated = await fpbx.updateExtPassword(lookup.extension, oldName, passwordToSet);
|
const updated = await fpbx.updateExtPassword(lookup.extension, oldName, passwordToSet);
|
||||||
//const updated = await fpbx.updateExtName(lookup.extension, passwordToSet);
|
//const updated = await fpbx.updateExtName(lookup.extension, passwordToSet);
|
||||||
await fpbx.reload();
|
console.log(updated)
|
||||||
await interaction.editReply({ content: `Your extension password has been reset successfully! Your new password is: ||\`${passwordToSet}\`||`, ephemeral: true });
|
await interaction.editReply({ content: `Your extension password has been reset successfully! Your new password is: ||\`${passwordToSet}\`||`, ephemeral: true });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
log.error(error);
|
log.error(error);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue