better var naming
This commit is contained in:
parent
2d6ba93e0a
commit
1a10382053
1 changed files with 3 additions and 3 deletions
|
|
@ -138,14 +138,14 @@ const defaultPrompts = [
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
export async function getPrompts(filterDisabled = false){
|
export async function getPrompts(onlyEnabled = false){
|
||||||
const defaultPrompts = await getDefaultPrompts_withProps();
|
const defaultPrompts = await getDefaultPrompts_withProps();
|
||||||
const customPrompts = await getCustomPrompts();
|
const customPrompts = await getCustomPrompts();
|
||||||
let output = defaultPrompts.concat(customPrompts);
|
let output = defaultPrompts.concat(customPrompts);
|
||||||
if(filterDisabled){
|
if(onlyEnabled){
|
||||||
output = output.filter(obj => obj.enabled != 0);
|
output = output.filter(obj => obj.enabled != 0);
|
||||||
}
|
}
|
||||||
output.sort((a, b) => a.id.localeCompare(b.id));
|
output.sort((a, b) => a.id.localeCompare(b.id));
|
||||||
for(let i=1; i<=output.length; i++){
|
for(let i=1; i<=output.length; i++){
|
||||||
output[i-1].idnum = i;
|
output[i-1].idnum = i;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue