File tree Expand file tree Collapse file tree 5 files changed +7
-13
lines changed Expand file tree Collapse file tree 5 files changed +7
-13
lines changed Original file line number Diff line number Diff line change 1+ import { notFound } from "next/navigation" ;
12import { parse } from "superjson" ;
23import { z } from "zod" ;
34
@@ -24,7 +25,7 @@ export const getFeed = async (params: Promise<{ slug: string }>) => {
2425
2526 return {
2627 feeds,
27- feed,
28+ feed : feed ?? notFound ( ) ,
2829 symbol,
2930 } as const ;
3031} ;
Original file line number Diff line number Diff line change @@ -22,11 +22,11 @@ export const getPublisherAverageScoreHistoryCached = redisCache.define(
2222 // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2323 // @ts -expect-error
2424 getPublisherAverageScoreHistory ,
25- ) . getPublisherAverageScoreHistory
25+ ) . getPublisherAverageScoreHistory as typeof getPublisherAverageScoreHistory ;
2626
2727export const getPublisherRankingHistoryCached = redisCache . define (
2828 "getPublisherRankingHistory" ,
2929 // eslint-disable-next-line @typescript-eslint/ban-ts-comment
3030 // @ts -expect-error
3131 getPublisherRankingHistory ,
32- ) . getPublisherRankingHistory
32+ ) . getPublisherRankingHistory as typeof getPublisherRankingHistory ;
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { z } from 'zod';
22
33import { getPythMetadata } from './get-metadata' ;
44import { Cluster , priceFeedsSchema } from "../../services/pyth" ;
5- import { DEFAULT_CACHE_TTL , redisCache } from '../../utils/cache' ;
5+ import { redisCache } from '../../utils/cache' ;
66
77const _getFeeds = async ( cluster : Cluster ) => {
88 const unfilteredData = await getPythMetadata ( cluster ) ;
@@ -31,9 +31,6 @@ const _getFeeds = async (cluster: Cluster) => {
3131
3232export const getFeedsCached = redisCache . define (
3333 "getFeeds" ,
34- {
35- ttl : DEFAULT_CACHE_TTL ,
36- } ,
3734 _getFeeds ,
3835) . getFeeds ;
3936
Original file line number Diff line number Diff line change 11
22import { clients , Cluster } from '../../services/pyth' ;
3- import { DEFAULT_CACHE_TTL , memoryOnlyCache } from '../../utils/cache' ;
3+ import { memoryOnlyCache } from '../../utils/cache' ;
44
55const _getPythMetadata = async ( cluster : Cluster ) => {
66 // Fetch fresh data from Pyth client
@@ -9,7 +9,6 @@ const _getPythMetadata = async (cluster: Cluster) => {
99
1010export const getPythMetadata = memoryOnlyCache . define (
1111 "getPythMetadata" ,
12- { ttl : DEFAULT_CACHE_TTL } ,
1312 _getPythMetadata ,
1413) . getPythMetadata ;
1514
Original file line number Diff line number Diff line change 11import { getPythMetadata } from './get-metadata' ;
22import { Cluster } from '../../services/pyth' ;
3- import { DEFAULT_CACHE_TTL , redisCache } from '../../utils/cache' ;
3+ import { redisCache } from '../../utils/cache' ;
44
55const _computePublishers = async ( cluster : Cluster ) => {
66 const data = await getPythMetadata ( cluster ) ;
@@ -15,8 +15,5 @@ const _computePublishers = async (cluster: Cluster) => {
1515
1616export const getPublishersForCluster = redisCache . define (
1717 "getPublishersForCluster" ,
18- {
19- ttl : DEFAULT_CACHE_TTL ,
20- } ,
2118 _computePublishers ,
2219) . getPublishersForCluster ;
You can’t perform that action at this time.
0 commit comments