Merge dev to main #1
11
index.js
11
index.js
|
|
@ -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({
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue