Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
reviews:
auto_review:
enabled: true
labels:
- "ready-for-review"
base_branches:
- ".*" # allows all branches
4 changes: 2 additions & 2 deletions app/api/collections/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { apiClient } from "@/app/lib/apiClient";

export async function GET(request: Request) {
try {
const { status, data } = await apiClient(request, "/api/v1/collections/");
const { status, data } = await apiClient(request, "/api/v1/collections");
return NextResponse.json(data, { status });
} catch (error: unknown) {
return NextResponse.json(
Expand All @@ -22,7 +22,7 @@ export async function POST(request: NextRequest) {
// Get the JSON body from the request
const body = await request.json();

const { status, data } = await apiClient(request, "/api/v1/collections/", {
const { status, data } = await apiClient(request, "/api/v1/collections", {
method: "POST",
body: JSON.stringify(body),
});
Expand Down
4 changes: 2 additions & 2 deletions app/api/configs/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export async function GET(request: Request) {
try {
const { searchParams } = new URL(request.url);
const queryString = searchParams.toString();
const endpoint = `/api/v1/configs/${queryString ? `?${queryString}` : ""}`;
const endpoint = `/api/v1/configs${queryString ? `?${queryString}` : ""}`;
const { status, data } = await apiClient(request, endpoint);
return NextResponse.json(data, { status });
} catch (error) {
Expand All @@ -24,7 +24,7 @@ export async function POST(request: Request) {
try {
const body = await request.json();

const { status, data } = await apiClient(request, "/api/v1/configs/", {
const { status, data } = await apiClient(request, "/api/v1/configs", {
method: "POST",
body: JSON.stringify(body),
});
Expand Down
6 changes: 3 additions & 3 deletions app/api/credentials/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { NextResponse, NextRequest } from "next/server";

export async function GET(request: NextRequest) {
try {
const { status, data } = await apiClient(request, "/api/v1/credentials/");
const { status, data } = await apiClient(request, "/api/v1/credentials");
return NextResponse.json(data, { status });
} catch (e: unknown) {
return NextResponse.json(
Expand All @@ -16,7 +16,7 @@ export async function GET(request: NextRequest) {
export async function POST(request: NextRequest) {
try {
const body = await request.json();
const { status, data } = await apiClient(request, "/api/v1/credentials/", {
const { status, data } = await apiClient(request, "/api/v1/credentials", {
method: "POST",
body: JSON.stringify(body),
});
Expand All @@ -32,7 +32,7 @@ export async function POST(request: NextRequest) {
export async function PATCH(request: NextRequest) {
try {
const body = await request.json();
const { status, data } = await apiClient(request, "/api/v1/credentials/", {
const { status, data } = await apiClient(request, "/api/v1/credentials", {
method: "PATCH",
body: JSON.stringify(body),
});
Expand Down
4 changes: 2 additions & 2 deletions app/api/document/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export async function GET(request: Request) {
try {
const { searchParams } = new URL(request.url);
const queryString = searchParams.toString();
const endpoint = `/api/v1/documents/${queryString ? `?${queryString}` : ""}`;
const endpoint = `/api/v1/documents${queryString ? `?${queryString}` : ""}`;
const { status, data } = await apiClient(request, endpoint);
return NextResponse.json(data, { status });
} catch (error: unknown) {
Expand Down Expand Up @@ -78,7 +78,7 @@ export async function POST(request: NextRequest) {
},
});

const { status, data } = await apiClient(request, "/api/v1/documents/", {
const { status, data } = await apiClient(request, "/api/v1/documents", {
method: "POST",
body: uploadBody,
headers: { "Content-Type": contentType },
Expand Down
2 changes: 1 addition & 1 deletion app/api/organization/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export async function GET(request: NextRequest) {

const { status, data } = await apiClient(
request,
`/api/v1/organizations/${queryString ? `?${queryString}` : ""}`,
`/api/v1/organizations${queryString ? `?${queryString}` : ""}`,
);
return NextResponse.json(data, { status });
} catch {
Expand Down
2 changes: 1 addition & 1 deletion app/api/projects/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { apiClient } from "@/app/lib/apiClient";
export async function POST(request: NextRequest) {
try {
const body = await request.json();
const { status, data } = await apiClient(request, "/api/v1/projects/", {
const { status, data } = await apiClient(request, "/api/v1/projects", {
method: "POST",
body: JSON.stringify(body),
});
Expand Down
14 changes: 5 additions & 9 deletions app/api/user-projects/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export async function GET(request: NextRequest) {

const { status, data } = await apiClient(
request,
`/api/v1/user-projects/${queryString ? `?${queryString}` : ""}`,
`/api/v1/user-projects${queryString ? `?${queryString}` : ""}`,
);
return NextResponse.json(data, { status });
} catch {
Expand All @@ -22,14 +22,10 @@ export async function GET(request: NextRequest) {
export async function POST(request: NextRequest) {
try {
const body = await request.json();
const { status, data } = await apiClient(
request,
"/api/v1/user-projects/",
{
method: "POST",
body: JSON.stringify(body),
},
);
const { status, data } = await apiClient(request, "/api/v1/user-projects", {
method: "POST",
body: JSON.stringify(body),
});
return NextResponse.json(data, { status });
} catch {
return NextResponse.json(
Expand Down
Binary file modified app/favicon.ico
Binary file not shown.
Loading