Skip to content

Commit

Permalink
fix: lido-stats status override
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeday committed Jun 7, 2024
1 parent 9636a65 commit 29faaaa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pages/api/lido-stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const lidoStats: API = async (req, res) => {
const cachedLidoStats = cache.get(config.CACHE_LIDO_STATS_KEY);

if (cachedLidoStats) {
res.status(200).json(cachedLidoStats);
res.json(cachedLidoStats);
} else {
const lidoStats = await getLidoStats();
cache.put(
Expand All @@ -31,7 +31,7 @@ const lidoStats: API = async (req, res) => {
config.CACHE_LIDO_STATS_TTL,
);

res.status(200).json({ data: lidoStats });
res.json({ data: lidoStats });
}
};

Expand Down
4 changes: 2 additions & 2 deletions pages/api/lidostats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const lidoStats: API = async (req, res) => {
const cachedLidoStats = cache.get(config.CACHE_LIDO_STATS_KEY);

if (cachedLidoStats) {
res.status(200).json(cachedLidoStats);
res.json(cachedLidoStats);
} else {
const lidoStats = await getLidoStats();
cache.put(
Expand All @@ -32,7 +32,7 @@ const lidoStats: API = async (req, res) => {
config.CACHE_LIDO_STATS_TTL,
);

res.status(200).json({ data: lidoStats });
res.json({ data: lidoStats });
}
};

Expand Down

0 comments on commit 29faaaa

Please sign in to comment.