better var naming

This commit is contained in:
Mic 2024-05-15 23:12:32 +02:00
parent 2d6ba93e0a
commit 1a10382053

View file

@ -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;
} }