Fix some logic in the settings menu
This commit is contained in:
parent
9ce7cb5f70
commit
b4d895b660
|
@ -41,7 +41,7 @@ const opts = { // Map of option number to step number
|
||||||
2: {step: 22, exec: () => {
|
2: {step: 22, exec: () => {
|
||||||
return 'Please provide the new long description. Say `cancel` to exit.';
|
return 'Please provide the new long description. Say `cancel` to exit.';
|
||||||
}},
|
}},
|
||||||
3: {step: 23, exec: async (hubId) => {
|
3: {step: 1, exec: async (hubId) => {
|
||||||
const [hub] = await pool.query('SELECT allowGiftPurchase FROM hubs WHERE id = ?', [hubId]);
|
const [hub] = await pool.query('SELECT allowGiftPurchase FROM hubs WHERE id = ?', [hubId]);
|
||||||
if (!hub) return 'Error fetching hub data.';
|
if (!hub) return 'Error fetching hub data.';
|
||||||
const newValue = hub.allowGiftPurchase ? 0 : 1;
|
const newValue = hub.allowGiftPurchase ? 0 : 1;
|
||||||
|
|
Loading…
Reference in a new issue