mirror of
				https://github.com/ItzCrazyKns/Perplexica.git
				synced 2025-11-04 04:38:15 +00:00 
			
		
		
		
	feat(routes): fix typo, closes #692
This commit is contained in:
		@@ -295,9 +295,9 @@ export const POST = async (req: Request) => {
 | 
				
			|||||||
      },
 | 
					      },
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
  } catch (err) {
 | 
					  } catch (err) {
 | 
				
			||||||
    console.error('An error ocurred while processing chat request:', err);
 | 
					    console.error('An error occurred while processing chat request:', err);
 | 
				
			||||||
    return Response.json(
 | 
					    return Response.json(
 | 
				
			||||||
      { message: 'An error ocurred while processing chat request' },
 | 
					      { message: 'An error occurred while processing chat request' },
 | 
				
			||||||
      { status: 500 },
 | 
					      { status: 500 },
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -59,9 +59,9 @@ export const GET = async (req: Request) => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    return Response.json({ ...config }, { status: 200 });
 | 
					    return Response.json({ ...config }, { status: 200 });
 | 
				
			||||||
  } catch (err) {
 | 
					  } catch (err) {
 | 
				
			||||||
    console.error('An error ocurred while getting config:', err);
 | 
					    console.error('An error occurred while getting config:', err);
 | 
				
			||||||
    return Response.json(
 | 
					    return Response.json(
 | 
				
			||||||
      { message: 'An error ocurred while getting config' },
 | 
					      { message: 'An error occurred while getting config' },
 | 
				
			||||||
      { status: 500 },
 | 
					      { status: 500 },
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
@@ -100,9 +100,9 @@ export const POST = async (req: Request) => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    return Response.json({ message: 'Config updated' }, { status: 200 });
 | 
					    return Response.json({ message: 'Config updated' }, { status: 200 });
 | 
				
			||||||
  } catch (err) {
 | 
					  } catch (err) {
 | 
				
			||||||
    console.error('An error ocurred while updating config:', err);
 | 
					    console.error('An error occurred while updating config:', err);
 | 
				
			||||||
    return Response.json(
 | 
					    return Response.json(
 | 
				
			||||||
      { message: 'An error ocurred while updating config' },
 | 
					      { message: 'An error occurred while updating config' },
 | 
				
			||||||
      { status: 500 },
 | 
					      { status: 500 },
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -48,7 +48,7 @@ export const GET = async (req: Request) => {
 | 
				
			|||||||
      },
 | 
					      },
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  } catch (err) {
 | 
					  } catch (err) {
 | 
				
			||||||
    console.error(`An error ocurred in discover route: ${err}`);
 | 
					    console.error(`An error occurred in discover route: ${err}`);
 | 
				
			||||||
    return Response.json(
 | 
					    return Response.json(
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        message: 'An error has occurred',
 | 
					        message: 'An error has occurred',
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -74,9 +74,9 @@ export const POST = async (req: Request) => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    return Response.json({ images }, { status: 200 });
 | 
					    return Response.json({ images }, { status: 200 });
 | 
				
			||||||
  } catch (err) {
 | 
					  } catch (err) {
 | 
				
			||||||
    console.error(`An error ocurred while searching images: ${err}`);
 | 
					    console.error(`An error occurred while searching images: ${err}`);
 | 
				
			||||||
    return Response.json(
 | 
					    return Response.json(
 | 
				
			||||||
      { message: 'An error ocurred while searching images' },
 | 
					      { message: 'An error occurred while searching images' },
 | 
				
			||||||
      { status: 500 },
 | 
					      { status: 500 },
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -34,7 +34,7 @@ export const GET = async (req: Request) => {
 | 
				
			|||||||
      },
 | 
					      },
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  } catch (err) {
 | 
					  } catch (err) {
 | 
				
			||||||
    console.error('An error ocurred while fetching models', err);
 | 
					    console.error('An error occurred while fetching models', err);
 | 
				
			||||||
    return Response.json(
 | 
					    return Response.json(
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        message: 'An error has occurred.',
 | 
					        message: 'An error has occurred.',
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -72,9 +72,9 @@ export const POST = async (req: Request) => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    return Response.json({ suggestions }, { status: 200 });
 | 
					    return Response.json({ suggestions }, { status: 200 });
 | 
				
			||||||
  } catch (err) {
 | 
					  } catch (err) {
 | 
				
			||||||
    console.error(`An error ocurred while generating suggestions: ${err}`);
 | 
					    console.error(`An error occurred while generating suggestions: ${err}`);
 | 
				
			||||||
    return Response.json(
 | 
					    return Response.json(
 | 
				
			||||||
      { message: 'An error ocurred while generating suggestions' },
 | 
					      { message: 'An error occurred while generating suggestions' },
 | 
				
			||||||
      { status: 500 },
 | 
					      { status: 500 },
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -74,9 +74,9 @@ export const POST = async (req: Request) => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    return Response.json({ videos }, { status: 200 });
 | 
					    return Response.json({ videos }, { status: 200 });
 | 
				
			||||||
  } catch (err) {
 | 
					  } catch (err) {
 | 
				
			||||||
    console.error(`An error ocurred while searching videos: ${err}`);
 | 
					    console.error(`An error occurred while searching videos: ${err}`);
 | 
				
			||||||
    return Response.json(
 | 
					    return Response.json(
 | 
				
			||||||
      { message: 'An error ocurred while searching videos' },
 | 
					      { message: 'An error occurred while searching videos' },
 | 
				
			||||||
      { status: 500 },
 | 
					      { status: 500 },
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user