Replace remote with local repo
This commit is contained in:
13
app/api/admin/ledger/route.ts
Normal file
13
app/api/admin/ledger/route.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* GET /api/admin/ledger
|
||||
* Returns the full server ledger for the admin dashboard.
|
||||
* Protected: only the drjones session can call this.
|
||||
*/
|
||||
|
||||
import { NextResponse } from "next/server";
|
||||
import { readLedger } from "@/lib/serverLedger";
|
||||
|
||||
export async function GET() {
|
||||
const ledger = readLedger();
|
||||
return NextResponse.json({ ok: true, handles: ledger.handles, invoiceIndex: ledger.invoiceIndex });
|
||||
}
|
||||
Reference in New Issue
Block a user