This commit is contained in:
Christopher Cookman 2025-10-28 07:37:15 -06:00
parent b5edd8ee48
commit f00d5fbde4

View file

@ -31,16 +31,7 @@ const main = () => {
}).then(async (response) => { }).then(async (response) => {
// Responses are an array of objects. The first should always have eventlist: 'start', and last should have eventlist: 'complete'. Remove these, make an array of objects {key, val} based on the rest of the response objects. // Responses are an array of objects. The first should always have eventlist: 'start', and last should have eventlist: 'complete'. Remove these, make an array of objects {key, val} based on the rest of the response objects.
let entries = response.filter(r => r.eventlist !== 'start' && r.eventlist !== 'complete').map(r => ({ key: r.key, val: r.val })); let entries = response.filter(r => r.eventlist !== 'start' && r.eventlist !== 'complete').map(r => ({ key: r.key, val: r.val }));
for (let entry of entries) { console.log(entries)
let [type, ext] = entry.key.split('/');
if (cfTypes[type]) {
respData.push({
extension: ext,
type: type,
target: entry.val
});
}
}
}).then(() => { }).then(() => {
sock.getList({ sock.getList({