First attempt at comma based preference collector

This commit is contained in:
James Cole
2024-04-26 05:31:02 +02:00
parent 565409b486
commit feabfe54f0
5 changed files with 213 additions and 71 deletions

View File

@@ -39,6 +39,10 @@ export function getVariable(name, defaultValue = null) {
return getter.getByName(name).then((response) => {
return Promise.resolve(parseResponse(name, response));
}).catch((error) => {
if('' === defaultValue) {
// do not try to store empty strings.
return Promise.resolve(defaultValue);
}
// preference does not exist (yet).
// POST it and then return it anyway.
let poster = (new Post);