Skip to content

Commit 2e72519

Browse files
committed
fix cache set list query
1 parent 57bd135 commit 2e72519

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/cache/query.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,13 @@ export async function getJson<T>(key: Key | DynamicKeyType) {
5151

5252
export async function setList(
5353
key: Key | DynamicKeyType,
54-
values: any[],
54+
list: any[],
5555
expireAt: Date | null = null,
5656
) {
5757
const multi = cache.multi();
58-
for (const i in values) {
59-
values[i] = JSON.stringify(values[i]);
58+
const values: any[] = []
59+
for (const i in list) {
60+
values[i] = JSON.stringify(list[i]);
6061
}
6162
multi.del(key);
6263
multi.rPush(key, values);

0 commit comments

Comments
 (0)