From 31dd41892e83c58f3eaccab23bb3c86a759b67d6 Mon Sep 17 00:00:00 2001 From: Ru Chern Chong Date: Mon, 14 Oct 2024 01:02:25 +0800 Subject: [PATCH] Use enum instead of hardcoding "coe" collection --- src/v1/routes/coe.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/v1/routes/coe.ts b/src/v1/routes/coe.ts index 1bd41c2..3764459 100644 --- a/src/v1/routes/coe.ts +++ b/src/v1/routes/coe.ts @@ -99,7 +99,7 @@ app.get("/months", async (c) => { }); app.get("/latest", async (c) => { - const CACHE_KEY = `coe:latest`; + const CACHE_KEY = `${Collection.COE}:latest`; const cachedData = await getCachedData(CACHE_KEY); if (cachedData) return c.json(cachedData);