Skip to content

Commit e28b377

Browse files
committed
fix deletion from cache
1 parent df128c1 commit e28b377

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/auth.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,6 @@ function Init() {
141141
},
142142
service: serviceUrl,
143143
})
144-
145-
await DeleteFromCache(key)
146144
})
147145

148146
router.get("/auth", passport.authenticate("oauth2"))

src/wol.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { ENV } from "./env.js"
77
import request from "./utils/request.js"
88

99
import * as wss from "./wss.js"
10-
import { GetFromCache } from "./db.js"
10+
import { GetFromCache, DeleteFromCache } from "./db.js"
1111

1212
const router = express.Router()
1313

@@ -327,7 +327,10 @@ async function startProcessing(req, res) {
327327
})
328328
}
329329

330-
const originalUrl = await GetFromCache(`service=${sessionID}`)
330+
const key = `service=${sessionID}`
331+
const originalUrl = await GetFromCache(key)
332+
333+
await DeleteFromCache(key)
331334

332335
if (!originalUrl) {
333336
return res.json({

0 commit comments

Comments
 (0)