Skip to content
Open
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 console-ui/src/app/api/payments/stripe/checkout/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { NextRequest, NextResponse } from "next/server";
const DEFAULT_COORD = process.env.NEXT_PUBLIC_COORDINATOR_URL || "https://api.darkbloom.dev";

export async function POST(req: NextRequest) {
const coordUrl = req.headers.get("x-coordinator-url") || DEFAULT_COORD;
const coordUrl = DEFAULT_COORD;

let authHeader = req.headers.get("authorization") || "";
if (!authHeader) {
Expand Down
2 changes: 1 addition & 1 deletion console-ui/src/app/api/payments/stripe/onboard/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { NextRequest, NextResponse } from "next/server";
const DEFAULT_COORD = process.env.NEXT_PUBLIC_COORDINATOR_URL || "https://api.darkbloom.dev";

export async function POST(req: NextRequest) {
const coordUrl = req.headers.get("x-coordinator-url") || DEFAULT_COORD;
const coordUrl = DEFAULT_COORD;

let authHeader = req.headers.get("authorization") || "";
if (!authHeader) {
Expand Down
2 changes: 1 addition & 1 deletion console-ui/src/app/api/payments/stripe/status/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
const DEFAULT_COORD = process.env.NEXT_PUBLIC_COORDINATOR_URL || "https://api.darkbloom.dev";

export async function GET(req: NextRequest) {
const coordUrl = req.headers.get("x-coordinator-url") || DEFAULT_COORD;
const coordUrl = DEFAULT_COORD;

let authHeader = req.headers.get("authorization") || "";
if (!authHeader) {
Expand All @@ -16,7 +16,7 @@

const url = new URL(req.url);
const refresh = url.searchParams.get("refresh");
const upstream = `${coordUrl}/v1/billing/stripe/status${refresh ? `?refresh=${refresh}` : ""}`;

Check warning on line 19 in console-ui/src/app/api/payments/stripe/status/route.ts

View workflow job for this annotation

GitHub Actions / Console UI Lint & Build

Refactor this code to not use nested template literals

const res = await fetch(upstream, {
headers: { ...(authHeader ? { Authorization: authHeader } : {}) },
Expand Down
2 changes: 1 addition & 1 deletion console-ui/src/app/api/payments/withdraw/stripe/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { NextRequest, NextResponse } from "next/server";
const DEFAULT_COORD = process.env.NEXT_PUBLIC_COORDINATOR_URL || "https://api.darkbloom.dev";

export async function POST(req: NextRequest) {
const coordUrl = req.headers.get("x-coordinator-url") || DEFAULT_COORD;
const coordUrl = DEFAULT_COORD;

let authHeader = req.headers.get("authorization") || "";
if (!authHeader) {
Expand Down
2 changes: 1 addition & 1 deletion console-ui/src/app/api/telemetry/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const MAX_BODY = 64 * 1024;
export const runtime = "nodejs";

export async function POST(req: NextRequest) {
const coordUrl = req.headers.get("x-coordinator-url") || DEFAULT_COORD;
const coordUrl = DEFAULT_COORD;

// Read with explicit size cap.
const raw = await req.text();
Expand Down
Loading