Skip to content

Commit

Permalink
Clean up and logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Inkvi committed Mar 12, 2024
1 parent 818e2fc commit 3300592
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
1 change: 1 addition & 0 deletions app/api/cache/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { getCacheTTL, SimpleCache } from '@/api/utils/cosmos';
import { getPackets } from '@/api/packets/route';

export async function GET(request: NextRequest) {
console.log('GET /api/cache');
// const TOKEN = process.env.TOKEN;
//
// if (request.headers.get('Authorization') !== `Bearer ${TOKEN}`) {
Expand Down
8 changes: 1 addition & 7 deletions app/api/packets/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ import { NextRequest, NextResponse } from 'next/server';
import { Packet, PacketStates } from 'utils/types/packet';
import { CHAIN, CHAIN_CONFIGS } from 'utils/chains/configs';
import { CachingJsonRpcProvider } from 'api/utils/provider-cache';
import { getCacheTTL, GetTmClient, SimpleCache } from 'api/utils/cosmos';
import { GetTmClient, SimpleCache } from 'api/utils/cosmos';
import Abi from 'utils/dispatcher.json';

import { getChannelsConcurrently } from '@/api/utils/peptide';

export const dynamic = 'force-dynamic'; // defaults to auto

function getLookbackTime() {
Expand Down Expand Up @@ -267,8 +265,4 @@ export async function GET(request: NextRequest) {
const cache = SimpleCache.getInstance();
const allPackets = cache.get('allPackets');
return NextResponse.json(allPackets || []);


// cache.set('allPackets', response, getCacheTTL());
// return NextResponse.json(response);
}

0 comments on commit 3300592

Please sign in to comment.