mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-04-30 00:02:44 +00:00
Merge pull request #679 from ItzCrazyKns/feat/remove-backend
feat(app): fix build errors
This commit is contained in:
@ -3,7 +3,7 @@ FROM node:20.18.0-alpine AS builder
|
|||||||
WORKDIR /home/perplexica
|
WORKDIR /home/perplexica
|
||||||
|
|
||||||
COPY package.json yarn.lock ./
|
COPY package.json yarn.lock ./
|
||||||
RUN yarn install --frozen-lockfile
|
RUN yarn install --frozen-lockfile --network-timeout 600000
|
||||||
|
|
||||||
COPY tsconfig.json next.config.mjs next-env.d.ts postcss.config.js drizzle.config.ts tailwind.config.ts ./
|
COPY tsconfig.json next.config.mjs next-env.d.ts postcss.config.js drizzle.config.ts tailwind.config.ts ./
|
||||||
COPY src ./src
|
COPY src ./src
|
||||||
|
@ -125,7 +125,11 @@ export const POST = async (req: Request) => {
|
|||||||
[],
|
[],
|
||||||
);
|
);
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise(
|
||||||
|
(
|
||||||
|
resolve: (value: Response) => void,
|
||||||
|
reject: (value: Response) => void,
|
||||||
|
) => {
|
||||||
let message = '';
|
let message = '';
|
||||||
let sources: any[] = [];
|
let sources: any[] = [];
|
||||||
|
|
||||||
@ -153,7 +157,8 @@ export const POST = async (req: Request) => {
|
|||||||
Response.json({ message: 'Search error', error }, { status: 500 }),
|
Response.json({ message: 'Search error', error }, { status: 500 }),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
},
|
||||||
|
);
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
console.error(`Error in getting search results: ${err.message}`);
|
console.error(`Error in getting search results: ${err.message}`);
|
||||||
return Response.json(
|
return Response.json(
|
||||||
|
Reference in New Issue
Block a user