Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "plotlink",
"version": "0.1.36",
"version": "0.1.37",
"private": true,
"workspaces": [
"packages/*"
Expand Down
2 changes: 0 additions & 2 deletions src/app/airdrop/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { UserPoints } from "../../components/airdrop/UserPoints";
import { ClaimPanel } from "../../components/airdrop/ClaimPanel";
import { Leaderboard } from "../../components/airdrop/Leaderboard";
import { WeeklySnapshots } from "../../components/airdrop/WeeklySnapshots";
import { MilestoneTrack } from "../../components/airdrop/MilestoneTrack";
import { AIRDROP_CONFIG } from "../../../lib/airdrop/config";

export const metadata: Metadata = {
Expand All @@ -29,7 +28,6 @@ export default function AirdropPage() {

{/* Right column: global sections */}
<div className="space-y-6">
<MilestoneTrack />
<Leaderboard />
<WeeklySnapshots />
</div>
Expand Down
34 changes: 34 additions & 0 deletions src/app/api/airdrop/daily-prices/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/**
* Daily FDV history for the campaign timeline chart (#936)
* GET /api/airdrop/daily-prices — no auth required
*
* Returns array of { date, fdv } ordered by date ascending.
*/

import { NextResponse } from "next/server";
import { createServerClient } from "../../../../../lib/supabase";

export async function GET() {
const supabase = createServerClient();
if (!supabase) {
return NextResponse.json({ error: "Supabase not configured" }, { status: 500 });
}

const { data, error } = await supabase
.from("pl_daily_prices")
.select("recorded_at, mcap_usd")
.order("recorded_at", { ascending: true });

if (error) {
return NextResponse.json({ error: error.message }, { status: 500 });
}

const points = (data ?? []).map((row) => ({
date: row.recorded_at,
fdv: Number(row.mcap_usd),
}));

return NextResponse.json(points, {
headers: { "Cache-Control": "public, s-maxage=300, stale-while-revalidate=60" },
});
}
Loading
Loading