parent
91111acfcf
commit
3d5ceaf054
1 changed files with 2 additions and 2 deletions
|
|
@ -120,7 +120,7 @@ app.head('*', handleGetHead)
|
||||||
// handle both GET and HEAD
|
// handle both GET and HEAD
|
||||||
async function handleGetHead(c: Context) {
|
async function handleGetHead(c: Context) {
|
||||||
// actual logic goes here
|
// actual logic goes here
|
||||||
const urlResult = await c.env.KV.get(c.get('key'), { cacheTtl: 86400 })
|
const urlResult = await c.env.KV.get(c.get('key'))
|
||||||
|
|
||||||
if (urlResult == null) {
|
if (urlResult == null) {
|
||||||
return c.json(
|
return c.json(
|
||||||
|
|
@ -144,7 +144,7 @@ async function handleGetHead(c: Context) {
|
||||||
|
|
||||||
// delete specific key
|
// delete specific key
|
||||||
app.delete('*', async (c) => {
|
app.delete('*', async (c) => {
|
||||||
const urlResult = await c.env.KV.get(c.get('key'), { cacheTtl: 86400 })
|
const urlResult = await c.env.KV.get(c.get('key'))
|
||||||
|
|
||||||
if (urlResult == null) {
|
if (urlResult == null) {
|
||||||
return c.json(
|
return c.json(
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue