From d627412514d661a377c789af9661c5ffe443576f Mon Sep 17 00:00:00 2001 From: Pontus Abrahamsson Date: Fri, 23 Feb 2024 08:46:37 +0100 Subject: [PATCH] Update dependencies --- apps/dashboard/README.md | 2 -- apps/dashboard/src/app/api/debug/route.ts | 21 +++++++++++++++++++++ packages/ui/tailwind.config.ts | 2 +- 3 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 apps/dashboard/src/app/api/debug/route.ts diff --git a/apps/dashboard/README.md b/apps/dashboard/README.md index 881d94a3d8..bee892532b 100644 --- a/apps/dashboard/README.md +++ b/apps/dashboard/README.md @@ -1,3 +1 @@ ### Dashboard - -### diff --git a/apps/dashboard/src/app/api/debug/route.ts b/apps/dashboard/src/app/api/debug/route.ts new file mode 100644 index 0000000000..92198fd03b --- /dev/null +++ b/apps/dashboard/src/app/api/debug/route.ts @@ -0,0 +1,21 @@ +import { getTransactions, transformTransactions } from "@midday/gocardless"; +import { download } from "@midday/supabase/storage"; +import { NextResponse } from "next/server"; + +export const preferredRegion = "fra1"; +export const runtime = "edge"; + +export async function GET(req, res) { + const requestUrl = new URL(req.url); + const id = requestUrl.searchParams.get("id"); + + const { transactions } = await getTransactions({ + accountId: id, + }); + + const formatted = transformTransactions(transactions.booked, { + teamId: 123, + }); + + return NextResponse.json(formatted); +} diff --git a/packages/ui/tailwind.config.ts b/packages/ui/tailwind.config.ts index 51f51d265a..79909c3c7c 100644 --- a/packages/ui/tailwind.config.ts +++ b/packages/ui/tailwind.config.ts @@ -1,7 +1,7 @@ import type { Config } from "tailwindcss"; export default { - darkMode: ["class", '[data-mode="dark"]'], + darkMode: ["class"], content: ["./src/**/*.{ts,tsx}"], theme: { extend: {