File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ export async function GET(request: NextRequest) {
129129 const spoolmanConnection = await prisma . spoolmanConnection . findFirst ( ) ;
130130 if ( spoolmanConnection ) {
131131 const client = new SpoolmanClient ( spoolmanConnection . url ) ;
132- const spools = await client . getSpools ( ) ;
132+ const spools = await client . getSpools ( true ) ; // Include archived spools for historical reports
133133 spoolLookup = new Map ( spools . map ( s => [ s . id , s ] ) ) ;
134134 }
135135 } catch {
Original file line number Diff line number Diff line change @@ -195,8 +195,9 @@ export class SpoolmanClient {
195195 /**
196196 * Get all spools
197197 */
198- async getSpools ( ) : Promise < Spool [ ] > {
199- return this . fetch ( '/spool' ) ;
198+ async getSpools ( includeArchived = false ) : Promise < Spool [ ] > {
199+ const params = includeArchived ? '?allow_archived=true' : '' ;
200+ return this . fetch ( `/spool${ params } ` ) ;
200201 }
201202
202203 /**
You can’t perform that action at this time.
0 commit comments