mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 08:46:22 +02:00
chore: ran linting
This commit is contained in:
parent
4a75603d4f
commit
3eb4d55ef5
17 changed files with 369 additions and 201 deletions
|
|
@ -33,10 +33,7 @@ function toClientHeaders(headers: Headers) {
|
|||
return nextHeaders;
|
||||
}
|
||||
|
||||
async function proxy(
|
||||
request: NextRequest,
|
||||
context: { params: Promise<{ path?: string[] }> }
|
||||
) {
|
||||
async function proxy(request: NextRequest, context: { params: Promise<{ path?: string[] }> }) {
|
||||
const params = await context.params;
|
||||
const path = params.path?.join("/") || "";
|
||||
const upstreamUrl = new URL(`${getBackendBaseUrl()}/api/v1/${path}`);
|
||||
|
|
@ -62,4 +59,12 @@ async function proxy(
|
|||
});
|
||||
}
|
||||
|
||||
export { proxy as GET, proxy as POST, proxy as PUT, proxy as PATCH, proxy as DELETE, proxy as OPTIONS, proxy as HEAD };
|
||||
export {
|
||||
proxy as GET,
|
||||
proxy as POST,
|
||||
proxy as PUT,
|
||||
proxy as PATCH,
|
||||
proxy as DELETE,
|
||||
proxy as OPTIONS,
|
||||
proxy as HEAD,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue