From 94d9957ee28eab581b1a95fcb2bca056ca263273 Mon Sep 17 00:00:00 2001 From: artlu99 Date: Fri, 1 Nov 2024 21:05:44 -0400 Subject: [PATCH] cleanup SassyHash api --- functions/getSassyHashes/index.ts | 1 - src/api/channelFeed.api.ts | 2 +- src/api/forYouFeed.api.ts | 2 +- src/api/mocks/mockornot.ts | 34 ++++++++++++++--------------- src/api/mocks/sassyHash.api.mock.ts | 2 +- 5 files changed, 20 insertions(+), 21 deletions(-) diff --git a/functions/getSassyHashes/index.ts b/functions/getSassyHashes/index.ts index 7021bde..689f760 100644 --- a/functions/getSassyHashes/index.ts +++ b/functions/getSassyHashes/index.ts @@ -37,7 +37,6 @@ const fetchSassyHashExpensiveApi = async (viewerFid: number, castHash: string, e `, { castHash, viewerFid }, ); - console.log('graphQLClient:', res); return { data: res.data.getTextByCastHash }; } catch (e) { console.error(e); diff --git a/src/api/channelFeed.api.ts b/src/api/channelFeed.api.ts index 8c0f7c5..eea4350 100644 --- a/src/api/channelFeed.api.ts +++ b/src/api/channelFeed.api.ts @@ -1,11 +1,11 @@ import { BotOrNotResult, getBotOrNot } from '@app/api/botOrNot.api'; import { getCronFeed } from '@app/api/cronFeed.api'; import { CastObject } from '@app/api/feed-types'; +import { getSassyHash, isSassy, SassyHash } from '@app/api/sassyHash.api'; import { ChannelObject } from '@app/api/warpcast-types'; import { IHashTag } from '@app/components/common/BaseHashTag/BaseHashTag'; import { CHANNEL_FEED_PAGESIZE } from '@app/constants/pinataPagination'; import { sift, unique } from 'radash'; -import { getSassyHash, isSassy, SassyHash } from './sassyHash.api'; export interface EnhancedCastObject extends CastObject { amFollowing: boolean; diff --git a/src/api/forYouFeed.api.ts b/src/api/forYouFeed.api.ts index 22e6f34..251721e 100644 --- a/src/api/forYouFeed.api.ts +++ b/src/api/forYouFeed.api.ts @@ -3,11 +3,11 @@ import { PagedCronFeed } from '@app/api/channelFeed.api'; import { FeedObject } from '@app/api/feed-types'; import { getTagsForCast } from '@app/api/followingFeed.api'; import { httpApi } from '@app/api/http.api'; +import { getSassyHash, isSassy } from '@app/api/sassyHash.api'; import { ChannelObject } from '@app/api/warpcast-types'; import { FORYOU_FEED_PAGESIZE } from '@app/constants/neynarPagination'; import { sift, unique } from 'radash'; import './mocks/mockornot'; -import { getSassyHash, isSassy } from './sassyHash.api'; interface ForYouFeedRequest { fid: number; diff --git a/src/api/mocks/mockornot.ts b/src/api/mocks/mockornot.ts index ddb33f4..91d83c7 100644 --- a/src/api/mocks/mockornot.ts +++ b/src/api/mocks/mockornot.ts @@ -1,18 +1,18 @@ // comment out for prod -// import './allChannels.api.mock'; -// import './botOrNot.api.mock'; -// import './castByHash.api.mock'; -// import './channelById.api.mock'; -// import './cronFeed.api.mock'; -// import './decent-bookmarks.api.mock'; -// import './fcan.api.mock'; -// import './followingByFid.api.mock'; -// import './followingFeed.api.mock'; -// import './forYouFeed.api.mock'; -// import './hubReactionsByFid.api.mock'; -// import './metadata.api.mock'; -// import './neynarReactionsByFid.api.mock'; -// import './reactionOnHash.api.mock'; -// import './reactionsByHash.api.mock'; -// import './sassyHash.api.mock'; -// import './userFollowingChannels.api.mock'; +import './allChannels.api.mock'; +import './botOrNot.api.mock'; +import './castByHash.api.mock'; +import './channelById.api.mock'; +import './cronFeed.api.mock'; +import './decent-bookmarks.api.mock'; +import './fcan.api.mock'; +import './followingByFid.api.mock'; +import './followingFeed.api.mock'; +import './forYouFeed.api.mock'; +import './hubReactionsByFid.api.mock'; +import './metadata.api.mock'; +import './neynarReactionsByFid.api.mock'; +import './reactionOnHash.api.mock'; +import './reactionsByHash.api.mock'; +import './sassyHash.api.mock'; +import './userFollowingChannels.api.mock'; diff --git a/src/api/mocks/sassyHash.api.mock.ts b/src/api/mocks/sassyHash.api.mock.ts index 2000061..5229a3b 100644 --- a/src/api/mocks/sassyHash.api.mock.ts +++ b/src/api/mocks/sassyHash.api.mock.ts @@ -1,5 +1,5 @@ import { httpApiMock } from '@app/api/mocks/http.api.mock'; -import { SassyHashResponse } from '../sassyHash.api'; +import { SassyHashResponse } from '@app/api/sassyHash.api'; const res: SassyHashResponse = { // data: {