Pepguy commited on
Commit
38d9f57
·
verified ·
1 Parent(s): 09395f6

Update app.js

Browse files
Files changed (1) hide show
  1. app.js +5 -7
app.js CHANGED
@@ -23,13 +23,11 @@ const drive = google.drive({ version: 'v3', auth });
23
 
24
  async function getAllRedisData() {
25
  const result = [];
26
- const {key, value} = await redis.keys('*'); // '*' matches all keys
27
- /* keys.forEach(key => {
28
- result.append(key)
29
- });
30
-
31
- return result; */
32
- return key, value;
33
  }
34
 
35
  async function uploadToDrive(filename) {
 
23
 
24
  async function getAllRedisData() {
25
  const result = [];
26
+ for await (const key of client.scanIterator()) {
27
+ const value = await client.get(key);
28
+ result.push({ key, value }); // Preserve both key and value
29
+ }
30
+ return result;
 
 
31
  }
32
 
33
  async function uploadToDrive(filename) {