turkopticon.getDone = function (ids, temp) {
const time = new Date().getTime();
const transaction = turkopticon.db.transaction([`requester`], `readwrite`);
const objectStore = transaction.objectStore(`requester`);
for (let key in temp) {
if (temp[key].hasOwnProperty(`id`)) {
temp[key].time = time;
const put = objectStore.put(temp[key]);
put.onsuccess = function (event) {
console.log(`put: Success!`, temp[key], event);
};
put.onerror = function (event) {
console.log(`put: Error!`, temp[key], event);
};
}
}
turkopticon.send(temp);
}