add deno run script

This commit is contained in:
bobbydigitales
2024-11-08 09:46:19 -08:00
parent 6ce693cefc
commit 6c692c4b9f
13 changed files with 383 additions and 283 deletions

View File

@@ -226,8 +226,12 @@ export async function getData(userID, lowerID, upperID) {
return new Promise((resolve, reject) => {
const getAllRequest = index.getAll(keyRangeValue);
getAllRequest.onsuccess = () => {
const records = getAllRequest.result.map((item) => item.data);
resolve(records);
// let records = [];
// for (let record of getAllRequest.result) {
// records.push(record);
// }
// // const records = getAllRequest.result.map((item: any) => item.data);
resolve(getAllRequest.result);
};
getAllRequest.onerror = () => {
console.error('Transaction failed:', getAllRequest.error?.message);