add deno run script
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user