feat(routes): fix typo, closes #692

This commit is contained in:
ItzCrazyKns
2025-03-27 11:36:58 +05:30
parent 27286465a3
commit 310c8a75fd
7 changed files with 14 additions and 14 deletions

View File

@ -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 },
); );
} }

View File

@ -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 },
); );
} }

View File

@ -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',

View File

@ -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 },
); );
} }

View File

@ -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.',

View File

@ -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 },
); );
} }

View File

@ -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 },
); );
} }