@@ -45,8 +45,6 @@ function addExceptionDetails<T extends { ExceptionId: number }>(items: T[]) {
4545export async function GET ( request : Request ) {
4646 const { searchParams } = new URL ( request . url ) ;
4747 const exceptionId = searchParams . get ( "exceptionId" ) ;
48- const raisedOnly = searchParams . get ( "raisedOnly" ) ;
49- const notRaisedOnly = searchParams . get ( "notRaisedOnly" ) ;
5048 const sortBy = searchParams . get ( "sortBy" ) ;
5149 const sortOrder = searchParams . get ( "sortOrder" ) ;
5250 const exceptionStatus = searchParams . get ( "exceptionStatus" ) ;
@@ -113,28 +111,6 @@ export async function GET(request: Request) {
113111 return NextResponse . json ( response , { status : 200 } ) ;
114112 }
115113
116- if ( notRaisedOnly ) {
117- const notRaisedExceptions = mockDataStore . getNotRaisedExceptions ( ) ;
118- const sortedItems = sortExceptions ( [ ...notRaisedExceptions ] , sortBy ) ;
119- const response = createExceptionListResponse (
120- addExceptionDetails ( sortedItems )
121- ) ;
122- return NextResponse . json ( response , { status : 200 } ) ;
123- }
124-
125- if ( raisedOnly ) {
126- const raisedExceptions = mockDataStore . getRaisedExceptions ( ) ;
127- const sortedItems = sortExceptions (
128- [ ...raisedExceptions ] ,
129- sortBy ,
130- "ServiceNowCreatedDate"
131- ) ;
132- const response = createExceptionListResponse (
133- addExceptionDetails ( sortedItems )
134- ) ;
135- return NextResponse . json ( response , { status : 200 } ) ;
136- }
137-
138114 // Default fallback
139115 return NextResponse . json (
140116 { error : "No valid query parameters provided" } ,
0 commit comments