Compare commits
No commits in common. "main" and "13-01-25-fa1780" have entirely different histories.
main
...
13-01-25-f
|
|
@ -162,12 +162,12 @@ export const handler = async (req, res) => {
|
|||
|
||||
const { command, key, value, ttl, secretData } = body;
|
||||
const client = await getOrCreateConnection({ secretData });
|
||||
|
||||
console.log("ttl", ttl, ttl || 0)
|
||||
var result
|
||||
if (command === "GET") {
|
||||
result = await client.get(key);
|
||||
} else if (command === "SET") {
|
||||
result = ttl ? await client.set(key, value, "EX", ttl) : await client.set(key, value);
|
||||
result = await client.set(key, value, "EX", ttl || 0);
|
||||
}
|
||||
|
||||
console.log('Command executed successfully:', JSON.stringify(result));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user