Skip to content

Commit 4f0ba84

Browse files
committed
add status
1 parent 05bf04c commit 4f0ba84

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

cache/middleware.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -471,11 +471,7 @@ const invalidateCache = (req, res, next) => {
471471
const cacheStats = (req, res) => {
472472
const stats = cache.getStats()
473473
const details = req.query.details === 'true' ? cache.getStats() : undefined
474-
475-
res.json({
476-
stats,
477-
details
478-
})
474+
res.status(200).json(stats)
479475
}
480476

481477
/**
@@ -486,7 +482,7 @@ const cacheClear = (req, res) => {
486482
const sizeBefore = cache.cache.size
487483
cache.clear()
488484

489-
res.json({
485+
res.status(200).json({
490486
message: 'Cache cleared',
491487
entriesCleared: sizeBefore,
492488
currentSize: cache.cache.size

0 commit comments

Comments
 (0)