Skip to content

Commit

Permalink
fix: depreceated api response
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeday committed Aug 7, 2024
1 parent 12d890f commit c4a6581
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
6 changes: 5 additions & 1 deletion pages/api/oneinch-rate.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { wrapRequest as wrapNextRequest } from '@lidofinance/next-api-wrapper';
import {
cacheControl,
wrapRequest as wrapNextRequest,
} from '@lidofinance/next-api-wrapper';

import { config } from 'config';
import {
Expand All @@ -24,6 +27,7 @@ export default wrapNextRequest([
cors({ origin: ['*'], methods: [HttpMethod.GET] }),
rateLimit,
responseTimeMetric(Metrics.request.apiTimings, API_ROUTES.ONEINCH_RATE),
cacheControl({ headers: config.CACHE_DEFAULT_HEADERS }),
sunsetBy({
sunsetTimestamp: API_LATER_SUNSET_TIMESTAMP,
replacementLink: getReplacementLink(API_ROUTES.ONEINCH_RATE),
Expand Down
6 changes: 5 additions & 1 deletion pages/api/short-lido-stats.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { wrapRequest as wrapNextRequest } from '@lidofinance/next-api-wrapper';
import {
cacheControl,
wrapRequest as wrapNextRequest,
} from '@lidofinance/next-api-wrapper';

import { config } from 'config';
import {
Expand All @@ -25,6 +28,7 @@ export default wrapNextRequest([
cors({ origin: ['*'], methods: [HttpMethod.GET] }),
rateLimit,
responseTimeMetric(Metrics.request.apiTimings, API_ROUTES.SHORT_LIDO_STATS),
cacheControl({ headers: config.CACHE_DEFAULT_HEADERS }),
sunsetBy({
sunsetTimestamp: API_LATER_SUNSET_TIMESTAMP,
replacementLink: getReplacementLink(API_ROUTES.SHORT_LIDO_STATS),
Expand Down
6 changes: 5 additions & 1 deletion pages/api/sma-steth-apr.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { wrapRequest as wrapNextRequest } from '@lidofinance/next-api-wrapper';
import {
cacheControl,
wrapRequest as wrapNextRequest,
} from '@lidofinance/next-api-wrapper';

import { config } from 'config';
import {
Expand All @@ -24,6 +27,7 @@ export default wrapNextRequest([
cors({ origin: ['*'], methods: [HttpMethod.GET] }),
rateLimit,
responseTimeMetric(Metrics.request.apiTimings, API_ROUTES.SMA_STETH_APR),
cacheControl({ headers: config.CACHE_DEFAULT_HEADERS }),
sunsetBy({
sunsetTimestamp: API_DEFAULT_SUNSET_TIMESTAMP,
replacementLink: getReplacementLink(API_ROUTES.SMA_STETH_APR),
Expand Down

0 comments on commit c4a6581

Please sign in to comment.