File tree Expand file tree Collapse file tree
app/(ee)/api/partners/applications Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { withWorkspace } from "@/lib/auth";
44import { prisma } from "@dub/prisma" ;
55import { NextResponse } from "next/server" ;
66
7+ // GET /api/partners/applications/[applicationId] – get a partner application
78export const GET = withWorkspace ( async ( { workspace, params } ) => {
89 const programId = getDefaultProgramIdOrThrow ( workspace ) ;
910
File renamed without changes.
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ const querySchema = z.object({
99 partnerId : z . string ( ) . min ( 1 ) ,
1010} ) ;
1111
12- // GET /api/programs/[programId]/ applications/history?partnerId= — applications for this program + partner email
12+ // GET /api/partners/ applications/history?partnerId= — historical applications for this partner
1313export const GET = withWorkspace ( async ( { workspace, searchParams } ) => {
1414 const programId = getDefaultProgramIdOrThrow ( workspace ) ;
1515 const { partnerId } = querySchema . parse ( searchParams ) ;
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ function ExportApplicationsModal({
5151
5252 try {
5353 const response = await fetch (
54- `/api/programs/ ${ program . id } /applications/export?${ new URLSearchParams ( {
54+ `/api/partners /applications/export?${ new URLSearchParams ( {
5555 workspaceId : workspaceId ,
5656 ...( data . columns . length
5757 ? { columns : data . columns . join ( "," ) }
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ export function PartnerApplicationDetails({
9898 const { data : historyData , isLoading : historyLoading } =
9999 useSWR < ApplicationHistoryResponse > (
100100 program && workspaceId && partnerId
101- ? `/api/programs/ ${ program . id } /applications/history?partnerId=${ encodeURIComponent ( partnerId ) } &workspaceId=${ workspaceId } `
101+ ? `/api/partners /applications/history?partnerId=${ encodeURIComponent ( partnerId ) } &workspaceId=${ workspaceId } `
102102 : null ,
103103 fetcher ,
104104 ) ;
@@ -139,7 +139,7 @@ export function PartnerApplicationDetails({
139139 program &&
140140 workspaceId &&
141141 resolvedApplicationId &&
142- `/api/programs/ ${ program . id } /applications/${ resolvedApplicationId } ?workspaceId=${ workspaceId } ` ;
142+ `/api/partners /applications/${ resolvedApplicationId } ?workspaceId=${ workspaceId } ` ;
143143
144144 const { data : application , isLoading : applicationLoading } =
145145 useSWR < ProgramApplication > ( applicationKey , fetcher ) ;
@@ -292,7 +292,11 @@ export function PartnerApplicationDetails({
292292 ) ) }
293293 </ div >
294294 < PartnerApplicationReviewOutcome application = { application } />
295- < PartnerApplicationReviewFooter reviewedAt = { application . reviewedAt } />
295+ { historyItems . length > 1 ? (
296+ < PartnerApplicationReviewFooter
297+ reviewedAt = { application . reviewedAt }
298+ />
299+ ) : null }
296300 </ >
297301 ) }
298302 </ div >
You can’t perform that action at this time.
0 commit comments